diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-25 01:01:49 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-25 01:01:49 +0000 |
commit | 3ce5f8f4ee27228b26f6d39d9e1cf75f439995a7 (patch) | |
tree | 6af2cfc1b0ec46aa179c5019f00274f1eba84fce /res/res_clialiases.c | |
parent | 7bf3c44abe26f6ce1dc917c33e5ed4a98e80776d (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 'res/res_clialiases.c')
-rw-r--r-- | res/res_clialiases.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/res/res_clialiases.c b/res/res_clialiases.c index 2d9a396a7..bb0a08387 100644 --- a/res/res_clialiases.c +++ b/res/res_clialiases.c @@ -59,7 +59,7 @@ static int alias_hash_cb(const void *obj, const int flags) } /*! \brief Comparison function used for aliases */ -static int alias_cmp_cb(void *obj, void *arg, void *data, int flags) +static int alias_cmp_cb(void *obj, void *arg, int flags) { const struct cli_alias *alias0 = obj, *alias1 = arg; @@ -88,7 +88,7 @@ static char *cli_alias_passthrough(struct ast_cli_entry *e, int cmd, struct ast_ const char *line; /* Try to find the alias based on the CLI entry */ - if (!(alias = ao2_find(cli_aliases, &tmp, NULL, OBJ_POINTER))) { + if (!(alias = ao2_find(cli_aliases, &tmp, OBJ_POINTER))) { return 0; } @@ -168,7 +168,7 @@ static struct ast_cli_entry cli_alias[] = { }; /*! \brief Function called to mark an alias for destruction */ -static int alias_mark(void *obj, void *arg, void *data, int flags) +static int alias_mark(void *obj, void *arg, int flags) { struct cli_alias *alias = obj; alias->marked = 1; @@ -176,7 +176,7 @@ static int alias_mark(void *obj, void *arg, void *data, int flags) } /*! \brief Function called to see if an alias is marked for destruction */ -static int alias_marked(void *obj, void *arg, void *data, int flags) +static int alias_marked(void *obj, void *arg, int flags) { struct cli_alias *alias = obj; return alias->marked ? CMP_MATCH : 0; @@ -199,7 +199,7 @@ static void load_config(int reload) /* Mark CLI aliases for pruning */ if (reload) { - ao2_callback(cli_aliases, OBJ_NODATA, alias_mark, NULL, NULL); + ao2_callback(cli_aliases, OBJ_NODATA, alias_mark, NULL); } for (v = ast_variable_browse(cfg, "general"); v; v = v->next) { @@ -229,7 +229,7 @@ static void load_config(int reload) /* Drop any CLI aliases that should no longer exist */ if (reload) { - ao2_callback(cli_aliases, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE , alias_marked, NULL, NULL); + ao2_callback(cli_aliases, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE , alias_marked, NULL); } ast_config_destroy(cfg); |