[asterisk-commits] russell: trunk r94788 - /trunk/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 26 10:51:17 CST 2007


Author: russell
Date: Wed Dec 26 10:51:16 2007
New Revision: 94788

URL: http://svn.digium.com/view/asterisk?view=rev&rev=94788
Log:
Fix a bug in peer handling that caused multiple instances of a peer to end up
in the peers container after a reload.  Somehow, this bug doesn't exist in 1.4 ...
(closes issue #11626)
(reported by pnlarsson, additional info from mvanbaak, fixed by me)

Modified:
    trunk/channels/chan_iax2.c

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=94788&r1=94787&r2=94788
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Wed Dec 26 10:51:16 2007
@@ -6454,7 +6454,7 @@
 		}
 	}
 
-	unlink_peer(peer);
+	ao2_unlink(peers, peer);
 }
 
 static void __expire_registry(const void *data)
@@ -9872,6 +9872,7 @@
 			oldha = peer->ha;
 			peer->ha = NULL;
 		}
+		unlink_peer(peer);
 	} else if ((peer = ao2_alloc(sizeof(*peer), peer_destructor))) {
 		peer->expire = -1;
 		peer->pokeexpire = -1;




More information about the asterisk-commits mailing list