aboutsummaryrefslogtreecommitdiffstats
path: root/main/features.c
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-07 22:39:30 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-07 22:39:30 +0000
commita7a95954c816e072bd44fb884029853a3585db33 (patch)
tree80eea1f19a98b0f9ca3ab09f32d0eea8aa0f85d5 /main/features.c
parentf7be936f69d32c2b9aedb70d25395cb51c01eea6 (diff)
Add ability to pass arbitrary data to the ao2_callback_fn (called from
ao2_callback and ao2_find). Currently, passing OBJ_POINTER to either of these mandates that the passed 'arg' is a hashable object, making searching for an ao2 object based on outside criteria difficult. Reviewed by Russell and Mark M. via ReviewBoard: http://reviewboard.digium.com/r/36/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155401 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/features.c')
-rw-r--r--main/features.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/features.c b/main/features.c
index 16fb8ea0e..276328365 100644
--- a/main/features.c
+++ b/main/features.c
@@ -295,7 +295,7 @@ static int parkinglot_hash_cb(const void *obj, const int flags)
return ast_str_hash(parkinglot->name);
}
-static int parkinglot_cmp_cb(void *obj, void *arg, int flags)
+static int parkinglot_cmp_cb(void *obj, void *arg, void *data, int flags)
{
struct ast_parkinglot *parkinglot = obj, *parkinglot2 = arg;
return !strcasecmp(parkinglot->name, parkinglot2->name) ? CMP_MATCH | CMP_STOP : 0;
@@ -2838,7 +2838,7 @@ struct ast_parkinglot *find_parkinglot(const char *name)
ast_copy_string(tmp_parkinglot.name, name, sizeof(tmp_parkinglot.name));
- parkinglot = ao2_find(parkinglots, &tmp_parkinglot, OBJ_POINTER);
+ parkinglot = ao2_find(parkinglots, &tmp_parkinglot, NULL, OBJ_POINTER);
if (parkinglot && option_debug)
ast_log(LOG_DEBUG, "Found Parkinglot: %s\n", parkinglot->name);