]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8297 #resolve [Auto STUN switches IPs quickly, WebRTC video not working]
authorBrian West <brian@freeswitch.org>
Sun, 4 Oct 2015 16:00:48 +0000 (11:00 -0500)
committerBrian West <brian@freeswitch.org>
Sun, 4 Oct 2015 16:22:18 +0000 (11:22 -0500)
src/switch_rtp.c

index a516053c3b146f97748d55f5f123f2d13085f753..0b1faeaaa50e5d57f1eda85e5818dbb464548ef8 100644 (file)
@@ -1184,7 +1184,7 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
                                ice->last_ok = now;
                                rtp_session->wrong_addrs = 0;
                        } else {
-                               if (((rtp_session->dtls && rtp_session->dtls->state != DS_READY) || !ice->ready || !ice->rready)) {
+                               if (((rtp_session->dtls && rtp_session->dtls->state != DS_READY) || !ice->ready || !ice->rready) && rtp_session->wrong_addrs > 2) {
                                        do_adj++;
                                } else if (rtp_session->wrong_addrs > 5 || elapsed >= 3000) {
                                        do_adj++;