[asterisk-commits] file: branch 1.6.1 r166858 - /branches/1.6.1/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 29 08:52:24 CST 2008


Author: file
Date: Mon Dec 29 08:52:22 2008
New Revision: 166858

URL: http://svn.digium.com/view/asterisk?view=rev&rev=166858
Log:
Per kpfleming add a note describing why you must never change the first element of peer_finding_info.

Modified:
    branches/1.6.1/channels/chan_sip.c

Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=166858&r1=166857&r2=166858
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Mon Dec 29 08:52:22 2008
@@ -4087,6 +4087,11 @@
 	return peer;
 }
 
+/* The first element here must *always* be tmp_peer. This is because the user of this function
+ * passes it in using OBJ_POINTER which causes astobj2 to perform hashing on the name to find
+ * where the peer is. Since tmp_peer is at the beginning this just magically works. Move it and it
+ * will break. People will be angry. Just don't do it.
+ */
 struct peer_finding_info {
 	struct sip_peer tmp_peer;
 	int forcenamematch;




More information about the asterisk-commits mailing list