From: Paul Belanger Date: Wed, 12 May 2010 20:01:39 +0000 (+0000) Subject: Merged revisions 262800 via svnmerge from X-Git-Tag: 1.6.2.9-rc1~2^2~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4855426e563526f62e4c98404af32a345c6c396d;p=thirdparty%2Fasterisk.git Merged revisions 262800 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r262800 | pabelanger | 2010-05-12 15:59:16 -0400 (Wed, 12 May 2010) | 8 lines 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: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@262801 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/cli.c b/main/cli.c index e411c0da99..72e3000e03 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; } @@ -582,7 +583,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 bd68aee0a4..7e0598d19f 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))