[asterisk-commits] twilson: branch 10 r341089 - in /branches/10: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 17 10:39:11 CDT 2011


Author: twilson
Date: Mon Oct 17 10:39:07 2011
New Revision: 341089

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=341089
Log:
Don't try to remove peers without IPs from peers_by_ip

(closes issue ASTERISK-18696)
........

Merged revisions 341088 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/chan_sip.c?view=diff&rev=341089&r1=341088&r2=341089
==============================================================================
--- branches/10/channels/chan_sip.c (original)
+++ branches/10/channels/chan_sip.c Mon Oct 17 10:39:07 2011
@@ -27309,7 +27309,9 @@
 		found++;
 		/* we've unlinked the peer from the peers container but not unlinked from the peers_by_ip container yet
 		  this leads to a wrong refcounter and the peer object is never destroyed */
-		ao2_t_unlink(peers_by_ip, peer, "ao2_unlink peer from peers_by_ip table");
+		if (!ast_sockaddr_isnull(&peer->addr)) {
+			ao2_t_unlink(peers_by_ip, peer, "ao2_unlink peer from peers_by_ip table");
+		}
 		if (!(peer->the_mark))
 			firstpass = 0;
 	} else {




More information about the asterisk-commits mailing list