mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-21 04:46:29 +00:00
Merge "chan_iax2: Reload of iax peer results in loss of host address/port"
This commit is contained in:
@@ -12913,7 +12913,13 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st
|
|||||||
/* Non-dynamic. Make sure we become that way if we're not */
|
/* Non-dynamic. Make sure we become that way if we're not */
|
||||||
AST_SCHED_DEL(sched, peer->expire);
|
AST_SCHED_DEL(sched, peer->expire);
|
||||||
ast_clear_flag64(peer, IAX_DYNAMIC);
|
ast_clear_flag64(peer, IAX_DYNAMIC);
|
||||||
|
if (peer->dnsmgr) {
|
||||||
|
// Make sure we refresh dnsmgr if we're using it
|
||||||
|
ast_dnsmgr_refresh(peer->dnsmgr);
|
||||||
|
} else {
|
||||||
|
// Or just invalidate the address
|
||||||
peer->addr.ss.ss_family = AST_AF_UNSPEC;
|
peer->addr.ss.ss_family = AST_AF_UNSPEC;
|
||||||
|
}
|
||||||
if (ast_dnsmgr_lookup(v->value, &peer->addr, &peer->dnsmgr, srvlookup ? "_iax._udp" : NULL)) {
|
if (ast_dnsmgr_lookup(v->value, &peer->addr, &peer->dnsmgr, srvlookup ? "_iax._udp" : NULL)) {
|
||||||
return peer_unref(peer);
|
return peer_unref(peer);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user