diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-22 20:21:36 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-22 20:21:36 +0000 |
commit | 7cfb554bf63d2603089d66ae9d65882c07580cc0 (patch) | |
tree | 63f9173d3291623373adb5a46c25bead4035bcab /UPGRADE.txt | |
parent | a3794b65b87cf7e0c2ac0de816446c369f522966 (diff) |
Merge changes from team/russell/iax_refcount.
This set of changes fixes problems with the handling of iax2_user and iax2_peer
objects. It was very possible for a thread to still hold a reference to one of
these objects while a reload operation tries to delete them. The fix here is to
ensure that all references to these objects are tracked so that they can't go away
while still in use.
To accomplish this, I used the astobj2 reference counted object model. This
code has been in one of Luigi Rizzo's branches for a long time and was primarily
developed by one of his students, Marta Carbone. I wanted to go ahead and bring
this in to 1.4 because there are other problems similar to the ones fixed by these
changes, so we might as well go ahead and use the new astobj if we're going to go
through all of the work necessary to fix the problems.
As a nice side benefit of these changes, peer and user handling got more efficient.
Using astobj2 lets us not hold the container lock for peers or users nearly as long
while iterating. Also, by changing a define at the top of chan_iax2.c, the objects
will be distributed in a hash table, drastically increasing lookup speed in these
containers, which will have a very big impact on systems that have a large number of
users or peers.
The use of the hash table will be made the default in trunk. It is not the default
in 1.4 because it changes the behavior slightly. Previously, since peers and users
were stored in memory in the same order they were specified in the configuration file,
you could influence peer and user matching order based on the order they are specified
in the configuration. The hash table does not guarantee any order in the container,
so this behavior will be going away. It just means that you have to be a little
more careful ensuring that peers and users are matched explicitly and not forcing
chan_iax2 to have to guess which user is the right one based on secret, host, and
access list settings, instead of simply using the username.
If you have any questions, feel free to ask on the asterisk-dev list.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80362 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'UPGRADE.txt')
-rw-r--r-- | UPGRADE.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/UPGRADE.txt b/UPGRADE.txt index 5be1a7f3c..b54e3f0af 100644 --- a/UPGRADE.txt +++ b/UPGRADE.txt @@ -314,6 +314,21 @@ Functions: The IAX2 channel: +* 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. 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. + + If you would like to go ahead and use the new behavior which doesn't use the + order in the config file to influence matching order, then change the + MAX_PEER_BUCKETS define in chan_iax2.c to a value greater than one. An + example is provided there. By changing this, you will get *much* better + performance on systems that do a lot of peer and user lookups as they will be + stored in memory in a much more efficient manner. + * The "mailboxdetail" option has been deprecated. Previously, if this option was not enabled, the 2 byte MSGCOUNT information element would be set to all 1's to indicate there there is some number of messages waiting. With this |