mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
Making match_by_addr into ao2_match_by_addr and making it available
everywhere since it could be a handy callback to have git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -437,6 +437,7 @@ void *ao2_callback(ao2_container *c,
|
||||
enum search_flags flags,
|
||||
ao2_callback_fn cb_fn, void *arg);
|
||||
|
||||
int ao2_match_by_addr(void *user_data, void *arg, int flags);
|
||||
/*!
|
||||
*
|
||||
*
|
||||
|
@@ -352,7 +352,7 @@ void *__ao2_link(ao2_container *c, void *user_data, int iax2_hack)
|
||||
/*!
|
||||
* \brief another convenience function is a callback that matches on address
|
||||
*/
|
||||
static int match_by_addr(void *user_data, void *arg, int flags)
|
||||
int ao2_match_by_addr(void *user_data, void *arg, int flags)
|
||||
{
|
||||
return (user_data == arg) ? (CMP_MATCH | CMP_STOP) : 0;
|
||||
}
|
||||
@@ -366,7 +366,7 @@ void *ao2_unlink(ao2_container *c, void *user_data)
|
||||
if (INTERNAL_OBJ(user_data) == NULL) /* safety check on the argument */
|
||||
return NULL;
|
||||
|
||||
ao2_callback(c, OBJ_UNLINK | OBJ_POINTER | OBJ_NODATA, match_by_addr, user_data);
|
||||
ao2_callback(c, OBJ_UNLINK | OBJ_POINTER | OBJ_NODATA, ao2_match_by_addr, user_data);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user