]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 63748 via svnmerge from
authorOlle Johansson <oej@edvina.net>
Thu, 10 May 2007 20:46:41 +0000 (20:46 +0000)
committerOlle Johansson <oej@edvina.net>
Thu, 10 May 2007 20:46:41 +0000 (20:46 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r63748 | oej | 2007-05-10 22:38:54 +0200 (Thu, 10 May 2007) | 4 lines

Do not allocate SIP pvt's for PEERs we can not reach.

This was seen as a lot of dialogs being created then immediately destroyed at reload/restart of the SIP channel.

........

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

channels/chan_sip.c

index f221054d7b22f0d90e7e0295caccafa14007667e..35eea7a12e4f348cf041a7f1e2f2696c8c633a9f 100644 (file)
@@ -14944,6 +14944,10 @@ static int sip_send_mwi_to_peer(struct sip_peer *peer)
        struct sip_pvt *p;
        int newmsgs, oldmsgs;
 
+       /* Do we have an IP address? If not, skip this peer */
+       if (!peer->addr.sin_addr.s_addr && !peer->defaddr.sin_addr.s_addr) 
+               return 0;
+
        /* Check for messages */
        ast_app_inboxcount(peer->mailbox, &newmsgs, &oldmsgs);