diff options
author | Sean Bright <sean@malleable.com> | 2008-11-07 22:39:30 +0000 |
---|---|---|
committer | Sean Bright <sean@malleable.com> | 2008-11-07 22:39:30 +0000 |
commit | 30d1744ffce823312d51379585e8c19f722ea4d6 (patch) | |
tree | 80eea1f19a98b0f9ca3ab09f32d0eea8aa0f85d5 /main/manager.c | |
parent | bd3f685f205c602554b84f458e6bc67a37d4d3c0 (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: https://origsvn.digium.com/svn/asterisk/trunk@155401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/manager.c')
-rw-r--r-- | main/manager.c | 4 |
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 */ |