Re-poke all peers on a reload (bug #216)
authorMark Spencer <markster@digium.com>
Thu, 4 Sep 2003 04:09:09 +0000 (04:09 +0000)
committerMark Spencer <markster@digium.com>
Thu, 4 Sep 2003 04:09:09 +0000 (04:09 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1470 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 14ddc53..71c5056 100755 (executable)
@@ -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;
 }