]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix race caused by consecutive stun packets
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 9 Sep 2014 16:35:47 +0000 (21:35 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 9 Sep 2014 16:35:51 +0000 (21:35 +0500)
src/switch_rtp.c

index 161f46f7825486bbb3e3d4961b556d0566e43f6a..a2264d2e15c070325463eaa8f1205af514eba4b0 100644 (file)
@@ -1127,7 +1127,7 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d
                                                if (!strcmp(ice->ice_params->cands[i][ice->proto].con_addr, host) && 
                                                        !strcmp(ice->ice_params->cands[i][ice->proto].cand_type, "relay")) {
 
-                                                       if (elapsed != 0 && elapsed < 5000) {
+                                                       if (rtp_session->last_stun && elapsed < 5000) {
                                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_WARNING,
                                                                                                  "Skiping RELAY stun/%s/dtls port change from %s:%u to %s:%u\n", is_rtcp ? "rtcp" : "rtp", 
                                                                                                  host2, port2,