[asterisk-commits] russell: branch russell/iax_refcount r80300 - in /team/russell/iax_refcount: ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 22 12:52:55 CDT 2007


Author: russell
Date: Wed Aug 22 12:52:54 2007
New Revision: 80300

URL: http://svn.digium.com/view/asterisk?view=rev&rev=80300
Log:
As much as it hurts me to do this, define MAX_PEER_BUCKETS to 1 for Asterisk 1.4
to maintain the behavior that the order entires are specified in the config can
determine matching order against them.  This is going to change in trunk, so has
been marked as deprecated behavior in UPGRADE.txt.

You can change the define for the number of buckets to get the increased performance
from the hash table.

Modified:
    team/russell/iax_refcount/UPGRADE.txt
    team/russell/iax_refcount/channels/chan_iax2.c

Modified: team/russell/iax_refcount/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/russell/iax_refcount/UPGRADE.txt?view=diff&rev=80300&r1=80299&r2=80300
==============================================================================
--- team/russell/iax_refcount/UPGRADE.txt (original)
+++ team/russell/iax_refcount/UPGRADE.txt Wed Aug 22 12:52:54 2007
@@ -316,10 +316,11 @@
 
 * It is possible that previous configurations depended on the order in which
   peers and users were specified in iax.conf for forcing the order in which
-  chan_iax2 matched against them.  Due to some bug fixes and optimizations made
-  to this code, the order of the config file no longer has any effect on the logic
-  for matching against these entries.  If this old behavior is desired, the
-  MAX_PEER_BUCKETS define in chan_iax2.c must be changed to a value of 1.
+  chan_iax2 matched against them.  This behavior is going away and is considered
+  deprecated in this version.  Avoid having ambiguous peer and user entries and
+  to make things easy on yourself, always set the "username" option for users
+  so that the remote end can match on that exactly instead of trying to infer
+  which user you want based on host.
 
 * The "mailboxdetail" option has been deprecated.  Previously, if this option
   was not enabled, the 2 byte MSGCOUNT information element would be set to all

Modified: team/russell/iax_refcount/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/russell/iax_refcount/channels/chan_iax2.c?view=diff&rev=80300&r1=80299&r2=80300
==============================================================================
--- team/russell/iax_refcount/channels/chan_iax2.c (original)
+++ team/russell/iax_refcount/channels/chan_iax2.c Wed Aug 22 12:52:54 2007
@@ -631,10 +631,19 @@
 	int count;
 } iaxq;
 
+/*!
+ * This module will get much higher performance when doing a lot of
+ * user and peer lookups if the number of buckets is increased from 1.
+ * However, to maintain old behavior for Asterisk 1.4, these are set to
+ * 1 by default.  When using multiple buckets, search order through these
+ * containers is considered random, so you will not be able to depend on
+ * the order the entires are specified in iax.conf for matching order. */
 #ifdef LOW_MEMORY
-#define MAX_PEER_BUCKETS 17
+#define MAX_PEER_BUCKETS 1
+/* #define MAX_PEER_BUCKETS 17 */
 #else
-#define MAX_PEER_BUCKETS 563
+#define MAX_PEER_BUCKETS 1
+/* #define MAX_PEER_BUCKETS 563 */
 #endif
 static ao2_container *peers;
 




More information about the asterisk-commits mailing list