aboutsummaryrefslogtreecommitdiffstats
path: root/main/manager.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/manager.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/manager.c')
-rw-r--r--main/manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/manager.c b/main/manager.c
index 8f4917309..9292c739e 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -3558,7 +3558,7 @@ static int variable_count_hash_fn(const void *vvc, const int flags)
return res;
}
-static int variable_count_cmp_fn(void *obj, void *vstr, int flags)
+static int variable_count_cmp_fn(void *obj, void *vstr, void *data, int flags)
{
/* Due to the simplicity of struct variable_count, it makes no difference
* if you pass in objects or strings, the same operation applies. This is
@@ -3667,7 +3667,7 @@ static void xml_translate(struct ast_str **out, char *in, struct ast_variable *v
if (!in_data) { /* build appropriate line start */
ast_str_append(out, 0, xml ? " " : "<tr><td>");
- if ((vc = ao2_find(vco, var, 0)))
+ if ((vc = ao2_find(vco, var, NULL, 0)))
vc->count++;
else {
/* Create a new entry for this one */