summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2015-05-22 17:52:29 -0400
committerCorey Farrell <git@cfware.com>2015-05-22 17:09:47 -0500
commit5a1f2a5884c250b2c709e4fb48f06dc0dfb39553 (patch)
treebc5da52203a49dd44b5f633520a37a2ac93cedef /include
parentf66c41e668429b9a07dfdf30832c02ddc223f4a4 (diff)
Astobj2: Run weakproxy subscription callbacks in reverse order.
Modify ao2_weakproxy_subscribe so each new subscription is added to the head of the list. This ensures that when other objects are allocated and use a subscription to the weakproxy for cleanup, cleanup will occur in the correct order. ASTERISK-25120 #close Change-Id: Ie0476f08ec21330de1b3f5a2dd3d9eb683df3d3d
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/astobj2.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h
index e02a4cd85..4a7aeeedd 100644
--- a/include/asterisk/astobj2.h
+++ b/include/asterisk/astobj2.h
@@ -612,6 +612,8 @@ void *__ao2_weakproxy_get_object(void *weakproxy, int flags,
* \retval 0 Success
* \retval -1 Failure
*
+ * \note Callbacks are run in the reverse order of subscriptions.
+ *
* \note This procedure will allow the same cb / data pair to be added to
* the same weakproxy multiple times.
*