From 145ae8a0fbfead007c178f315dc1716925336fd8 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 22 Sep 2015 13:52:50 -0500 Subject: [PATCH] FS-8031 firefox was giving up because we replied to their stun --- src/switch_rtp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 0ddce9648e..5c4e48aaf7 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -1185,7 +1185,7 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d rtp_session->wrong_addrs = 0; } else { if ((rtp_session->dtls->state != DS_READY || !ice->ready || !ice->rready)) { - do_adj = 1; + do_adj++; } else if (rtp_session->wrong_addrs > 5 || elapsed >= 3000) { do_adj++; } @@ -1229,8 +1229,9 @@ 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; } - - switch_socket_sendto(sock_output, from_addr, 0, (void *) rpacket, &bytes); + if (cmp) { + switch_socket_sendto(sock_output, from_addr, 0, (void *) rpacket, &bytes); + } } } else if (packet->header.type == SWITCH_STUN_BINDING_ERROR_RESPONSE) {