aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-23 16:53:52 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-23 16:53:52 +0000
commit49117809e47318400e72667ab884b8f86727cc76 (patch)
tree0ba219cf4a255dd0fa92b2e017dadbac29b6bf81 /include
parent29b6e688cf787390d9ff0cea3da4e478e0497ee9 (diff)
This is a hack to maintain old behavior of chan_iax2. This ensures that if
the peers and users are being stored in a linked list, that they go in the list in the same order that the older code used. This is necessary to maintain the behavior of which peers and users get matched when traversing the container. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80497 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/astobj2.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h
index 7663b1b65..cd0324dab 100644
--- a/include/asterisk/astobj2.h
+++ b/include/asterisk/astobj2.h
@@ -368,8 +368,15 @@ int ao2_container_count(ao2_container *c);
* This function insert an object in a container according its key.
*
* \note Remember to set the key before calling this function.
+ *
+ * For Asterisk 1.4 only, there is a dirty hack here to ensure that chan_iax2
+ * can have objects linked in to the container at the head instead of tail
+ * when it is just a linked list. This is to maintain some existing behavior
+ * where the order must be maintained as it was before this conversion so that
+ * matching behavior doesn't change.
*/
-void *ao2_link(ao2_container *c, void *newobj);
+#define ao2_link(c, o) __ao2_link(c, o, 0)
+void *__ao2_link(ao2_container *c, void *newobj, int iax2_hack);
void *ao2_unlink(ao2_container *c, void *newobj);
/*! \struct Used as return value if the flag OBJ_MULTIPLE is set */