Bug 1335966: skip refreshing ICE cosent for streams with no consent context. r=bwc

MozReview-Commit-ID: 91aZIMdGBAQ

--HG--
extra : rebase_source : 4cf76f2344fe74ed026e1029753a45a3203f072a
This commit is contained in:
Nils Ohlmeier [:drno] 2017-02-01 16:54:59 -08:00
Родитель 893cd425c8
Коммит 62d88014e0
2 изменённых файлов: 9 добавлений и 7 удалений

Просмотреть файл

@ -1359,6 +1359,10 @@ static void nr_ice_component_consent_timer_cb(NR_SOCKET s, int how, void *cb_arg
nr_ice_component *comp=cb_arg;
int r;
if (!comp->consent_ctx) {
return;
}
if (comp->consent_timer) {
NR_async_timer_cancel(comp->consent_timer);
}

Просмотреть файл

@ -592,9 +592,7 @@ void nr_ice_media_stream_refresh_consent_all(nr_ice_media_stream *stream)
comp=STAILQ_FIRST(&stream->components);
while(comp){
if((comp->state != NR_ICE_COMPONENT_DISABLED) &&
(comp->local_component->state != NR_ICE_COMPONENT_DISABLED) &&
comp->disconnected) {
if(comp->disconnected) {
nr_ice_component_refresh_consent_now(comp);
}
@ -608,10 +606,7 @@ void nr_ice_media_stream_disconnect_all_components(nr_ice_media_stream *stream)
comp=STAILQ_FIRST(&stream->components);
while(comp){
if((comp->state != NR_ICE_COMPONENT_DISABLED) &&
(comp->local_component->state != NR_ICE_COMPONENT_DISABLED)) {
comp->disconnected = 1;
}
comp->disconnected = 1;
comp=STAILQ_NEXT(comp,entry);
}
@ -731,6 +726,9 @@ int nr_ice_media_stream_component_failed(nr_ice_media_stream *stream,nr_ice_comp
stream->timer=0;
}
/* Cancel consent timers in case it is running already */
nr_ice_component_consent_destroy(component);
if (stream->pctx->handler) {
stream->pctx->handler->vtbl->stream_failed(stream->pctx->handler->obj,stream->local_stream);
}