summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2014-01-09 16:52:57 +0000
committerKevin Harwell <kharwell@digium.com>2014-01-09 16:52:57 +0000
commitbce38c0cc59a3388ef15d0de3e41508be946aa5f (patch)
tree6efdc9911c9adec29f5ebe7fe759ec26d53f7842 /res
parent50b2d6eec162de15370544c8feab6165a340e66a (diff)
res_rtp_asterisk: Fails to resume WebRTC call from hold
In ast_rtp_ice_start if the ice session create check list failed, start check was never initiated and ice_started was never set to true. Upon re-entering the function (for instance, [un]hold) it would try to create the check list again with duplicate remote candidates. Fixed so that if the create check list fails the necessary data structures are properly re-initialized for any subsequent retries. Note, it was decided to not stop ice support (by calling ast_rtp_ice_stop) on a check list failure because it possible things might still work. However, a debug message was added to help with any future troubleshooting. (closes issue ASTERISK-22911) Reported by: Vytis Valentinavičius Patches: works_on_my_machine.patch uploaded by xytis (license 6558) ........ Merged revisions 405234 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 405235 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r--res/res_rtp_asterisk.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 14dbe24ee..b2f11dc37 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -555,7 +555,17 @@ static void ast_rtp_ice_start(struct ast_rtp_instance *instance)
pj_timer_heap_poll(timerheap, NULL);
rtp->ice_started = 1;
rtp->strict_rtp_state = STRICT_RTP_OPEN;
+ return;
}
+
+ /* even though create check list failed don't stop ice as
+ it might still work */
+ ast_debug(1, "Failed to create ICE session check list\n");
+ /* however we do need to reset remote candidates since
+ this function may be re-entered */
+ ao2_ref(rtp->remote_candidates, -1);
+ rtp->remote_candidates = NULL;
+ rtp->ice->rcand_cnt = rtp->ice->clist.count = 0;
}
static void ast_rtp_ice_stop(struct ast_rtp_instance *instance)