Re-poke all peers on a reload (bug #216)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
9c12f6b550
commit
bb0fba0974
|
@ -5250,6 +5250,7 @@ static int reload_config(void)
|
|||
char *config = "iax.conf";
|
||||
struct iax2_registry *reg;
|
||||
struct sockaddr_in dead_sin;
|
||||
struct iax2_peer *peer;
|
||||
strncpy(accountcode, "", sizeof(accountcode)-1);
|
||||
amaflags = 0;
|
||||
notransfer = 0;
|
||||
|
@ -5259,6 +5260,11 @@ static int reload_config(void)
|
|||
prune_peers();
|
||||
for (reg = registrations; reg; reg = reg->next)
|
||||
iax2_do_register(reg);
|
||||
/* Qualify hosts, too */
|
||||
ast_mutex_lock(&peerl.lock);
|
||||
for (peer = peerl.peers; peer; peer = peer->next)
|
||||
iax2_poke_peer(peer);
|
||||
ast_mutex_unlock(&peerl.lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue