diff options
author | pabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-05-12 19:59:16 +0000 |
---|---|---|
committer | pabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-05-12 19:59:16 +0000 |
commit | 46202599e2b9535853f07ba9a6329eb78c72cf39 (patch) | |
tree | eca9103a5fc81a6ca87744687e4c65ba1249b527 | |
parent | 4d777e48d0d2426006cdfbf3149dd66d36f98359 (diff) |
Notify CLI when modules is loaded / unloaded
(closes issue #17308)
Reported by: pabelanger
Patches:
cli.modules.patch uploaded by pabelanger (license 224)
Tested by: pabelanger, russell
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@262800 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | main/cli.c | 3 | ||||
-rw-r--r-- | main/loader.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/main/cli.c b/main/cli.c index 99dc1b54b..acb1f6b15 100644 --- a/main/cli.c +++ b/main/cli.c @@ -263,6 +263,7 @@ static char *handle_load(struct ast_cli_entry *e, int cmd, struct ast_cli_args * ast_cli(a->fd, "Unable to load module %s\n", a->argv[e->args]); return CLI_FAILURE; } + ast_cli(a->fd, "Loaded %s\n", a->argv[e->args]); return CLI_SUCCESS; } @@ -586,7 +587,9 @@ static char *handle_unload(struct ast_cli_entry *e, int cmd, struct ast_cli_args ast_cli(a->fd, "Unable to unload resource %s\n", a->argv[x]); return CLI_FAILURE; } + ast_cli(a->fd, "Unloaded %s\n", a->argv[x]); } + return CLI_SUCCESS; } diff --git a/main/loader.c b/main/loader.c index d8a9d6448..3c27357aa 100644 --- a/main/loader.c +++ b/main/loader.c @@ -490,7 +490,7 @@ int ast_unload_resource(const char *resource_name, enum ast_module_unload_mode f if (!(mod = find_resource(resource_name, 0))) { AST_LIST_UNLOCK(&module_list); ast_log(LOG_WARNING, "Unload failed, '%s' could not be found\n", resource_name); - return 0; + return -1; } if (!(mod->flags.running || mod->flags.declined)) |