aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-25 01:01:49 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-25 01:01:49 +0000
commit3ce5f8f4ee27228b26f6d39d9e1cf75f439995a7 (patch)
tree6af2cfc1b0ec46aa179c5019f00274f1eba84fce /funcs
parent7bf3c44abe26f6ce1dc917c33e5ed4a98e80776d (diff)
This is basically a complete rollback of r155401, as it was determined that
it would be best to maintain API compatibility. Instead, this commit introduces ao2_callback_data() which is functionally identical to ao2_callback() except that it allows you to pass arbitrary data to the callback. Reviewed by Mark Michelson via ReviewBoard: http://reviewboard.digium.com/r/64 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158959 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_dialgroup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/funcs/func_dialgroup.c b/funcs/func_dialgroup.c
index a673e34d0..4e4f63389 100644
--- a/funcs/func_dialgroup.c
+++ b/funcs/func_dialgroup.c
@@ -96,7 +96,7 @@ static int group_hash_fn(const void *obj, const int flags)
return ast_str_hash(g->name);
}
-static int group_cmp_fn(void *obj1, void *name2, void *data, int flags)
+static int group_cmp_fn(void *obj1, void *name2, int flags)
{
struct group *g1 = obj1, *g2 = name2;
char *name = name2;
@@ -112,7 +112,7 @@ static int entry_hash_fn(const void *obj, const int flags)
return ast_str_hash(e->name);
}
-static int entry_cmp_fn(void *obj1, void *name2, void *data, int flags)
+static int entry_cmp_fn(void *obj1, void *name2, int flags)
{
struct group_entry *e1 = obj1, *e2 = name2;
char *name = name2;
@@ -125,7 +125,7 @@ static int entry_cmp_fn(void *obj1, void *name2, void *data, int flags)
static int dialgroup_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
struct ao2_iterator i;
- struct group *grhead = ao2_find(group_container, data, NULL, 0);
+ struct group *grhead = ao2_find(group_container, data, 0);
struct group_entry *entry;
size_t bufused = 0;
int trunc_warning = 0;
@@ -206,7 +206,7 @@ static int dialgroup_write(struct ast_channel *chan, const char *cmd, char *data
AST_STANDARD_APP_ARGS(args, data);
AST_NONSTANDARD_APP_ARGS(inter, value, '&');
- if (!(grhead = ao2_find(group_container, args.group, NULL, 0))) {
+ if (!(grhead = ao2_find(group_container, args.group, 0))) {
/* Create group */
grhead = ao2_alloc(sizeof(*grhead), group_destroy);
if (!grhead)
@@ -245,7 +245,7 @@ static int dialgroup_write(struct ast_channel *chan, const char *cmd, char *data
}
} else if (strncasecmp(args.op, "del", 3) == 0) {
for (j = 0; j < inter.argc; j++) {
- if ((entry = ao2_find(grhead->entries, inter.faces[j], NULL, OBJ_UNLINK))) {
+ if ((entry = ao2_find(grhead->entries, inter.faces[j], OBJ_UNLINK))) {
ao2_ref(entry, -1);
} else {
ast_log(LOG_WARNING, "Interface '%s' not found in dialgroup '%s'\n", inter.faces[j], grhead->name);