[asterisk-commits] oej: branch 1.2 r63748 - /branches/1.2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu May 10 13:38:55 MST 2007


Author: oej
Date: Thu May 10 15:38:54 2007
New Revision: 63748

URL: http://svn.digium.com/view/asterisk?view=rev&rev=63748
Log:
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.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=63748&r1=63747&r2=63748
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Thu May 10 15:38:54 2007
@@ -11562,6 +11562,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_messagecount(peer->mailbox, &newmsgs, &oldmsgs);



More information about the asterisk-commits mailing list