Merged revisions 80849 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Fri, 24 Aug 2007 21:23:14 +0000 (21:23 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 24 Aug 2007 21:23:14 +0000 (21:23 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80849 | russell | 2007-08-24 16:22:50 -0500 (Fri, 24 Aug 2007) | 5 lines

If dnsmgr is in use, and no DNS servers are available when Asterisk first
starts, then don't give up on poking peers.  Allow the poke to get rescheduled
so that it will work once the dnsmgr is able to resolve the host.
(closes issue #10521, patch by jamesgolovich)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80850 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 9290f23..bf92ba9 100644 (file)
@@ -9001,8 +9001,8 @@ static int iax2_poke_peer_cb(void *obj, void *arg, int flags)
 
 static int iax2_poke_peer(struct iax2_peer *peer, int heldcall)
 {
-       if (!peer->maxms || !peer->addr.sin_addr.s_addr) {
-               /* IF we have no IP, or this isn't to be monitored, return
+       if (!peer->maxms || (!peer->addr.sin_addr.s_addr && !peer->dnsmgr)) {
+               /* IF we have no IP without dnsmgr, or this isn't to be monitored, return
                  immediately after clearing things out */
                peer->lastms = 0;
                peer->historicms = 0;