After receiving an IP via STUN, do not trigger registration, if not used
This commit is contained in:
parent
bab1b391c2
commit
ee9ea365d8
|
@ -1658,8 +1658,10 @@ static void stun_bind_cb(stun_discovery_magic_t *magic, stun_handle_t __attribut
|
||||||
timer_start(&sip_ep->stun_retry_timer, sip_ep->stun_interval);
|
timer_start(&sip_ep->stun_retry_timer, sip_ep->stun_interval);
|
||||||
PDEBUG(DSIP, DEBUG_INFO, "STUN resolved!\n");
|
PDEBUG(DSIP, DEBUG_INFO, "STUN resolved!\n");
|
||||||
PDEBUG(DSIP, DEBUG_DEBUG, " -> Public IP = %s\n", public_ip);
|
PDEBUG(DSIP, DEBUG_DEBUG, " -> Public IP = %s\n", public_ip);
|
||||||
|
/* only if IP changed and only if we do register */
|
||||||
if (!!strcmp(sip_ep->public_ip, public_ip)) {
|
if (!!strcmp(sip_ep->public_ip, public_ip)) {
|
||||||
strcpy(sip_ep->public_ip, public_ip);
|
strcpy(sip_ep->public_ip, public_ip);
|
||||||
|
if (sip_ep->register_state)
|
||||||
sip_ep->register_state = REGISTER_STATE_UNREGISTERED;
|
sip_ep->register_state = REGISTER_STATE_UNREGISTERED;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue