[svn-commits] oej: branch 1.4 r63749 - in /branches/1.4: ./ channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu May 10 13:46:42 MST 2007


Author: oej
Date: Thu May 10 15:46:41 2007
New Revision: 63749

URL: http://svn.digium.com/view/asterisk?view=rev&rev=63749
Log:
Merged revisions 63748 via svnmerge from 
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.

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/channels/chan_sip.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=63749&r1=63748&r2=63749
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Thu May 10 15:46:41 2007
@@ -14943,6 +14943,10 @@
 	/* Called with peerl lock, but releases it */
 	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);



More information about the svn-commits mailing list