diff options
author | Corey Farrell <git@cfware.com> | 2017-10-09 18:51:05 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2017-10-10 20:17:09 -0400 |
commit | e54238388de65410b0321a321cb2796946f71113 (patch) | |
tree | f4dae1412a2cf298bcbf9d9a5822d4739bbffa13 /include | |
parent | 0727a8e5242f4493ff3d7375e6996924cd00cbea (diff) |
astobj2: Add ao2_weakproxy_find function.
This function finds a weak proxy in an ao2_container and returns the
real object associated with it.
Change-Id: I9da822049747275f5961b5c0a7f14e87157d65d8
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/astobj2.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h index 9b5ec123b..a18f099c0 100644 --- a/include/asterisk/astobj2.h +++ b/include/asterisk/astobj2.h @@ -1775,6 +1775,17 @@ void *__ao2_callback_data(struct ao2_container *c, enum search_flags flags, void *__ao2_find(struct ao2_container *c, const void *arg, enum search_flags flags, const char *tag, const char *file, int line, const char *func); +/*! + * \brief Perform an ao2_find on a container with ao2_weakproxy objects, returning the real object. + * + * \note Only OBJ_SEARCH_* and OBJ_NOLOCK flags are supported by this function. + * \see ao2_callback for description of arguments. + */ +#define ao2_weakproxy_find(c, arg, flags, tag) \ + __ao2_weakproxy_find(c, arg, flags, tag, __FILE__, __LINE__, __PRETTY_FUNCTION__) +void *__ao2_weakproxy_find(struct ao2_container *c, const void *arg, enum search_flags flags, + const char *tag, const char *file, int line, const char *func); + /*! \brief * * |