Files
asterisk/include/asterisk
Russell Bryant 6a15e95a32 astobj2: Avoid using temporary objects + ao2_find() with OBJ_POINTER.
There is a fairly common pattern making its way through the code base where we
put a temporary object on the stack so we can call ao2_find() with OBJ_POINTER.
The purpose is so that it can be passed into the object hash function.
However, this really seems like a hack and potentially error prone.  This patch
is a first stab at approach to avoid having to do that.

It adds a new flag, OBJ_KEY, which can be used instead of OBJ_POINTER in these
situations.  Then, the hash function can know whether it was given an object or
some custom data to hash.

The patch also changes some uses of ao2_find() for iax2_user and iax2_peer
objects to reflect how OBJ_KEY would be used.

So long, and thanks for all the fish.

Review: https://reviewboard.asterisk.org/r/1184/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-29 19:34:36 +00:00
..
2010-06-02 18:10:15 +00:00
2009-04-29 18:53:01 +00:00
2010-06-08 14:38:18 +00:00
2011-03-04 23:22:39 +00:00
2010-06-08 14:38:18 +00:00
2009-03-18 02:28:55 +00:00
2010-06-08 14:38:18 +00:00
2009-06-15 16:07:23 +00:00
2010-07-23 16:19:21 +00:00
2010-08-30 08:25:50 +00:00
2010-06-08 14:38:18 +00:00
2011-05-26 15:55:22 +00:00
2010-07-08 22:08:07 +00:00
2010-06-08 14:38:18 +00:00
2010-06-08 14:38:18 +00:00