aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorpabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-12 20:02:58 +0000
committerpabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-12 20:02:58 +0000
commit7cc7ed10fd298d4edec940bd7754703a551350ee (patch)
treeeb3dfe357c74a2bcf920925d99bd6ad51f2da833 /main
parentf62c1d022cf68913a7a702ac900d47c2632aa833 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.6.1@262802 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/cli.c3
-rw-r--r--main/loader.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/main/cli.c b/main/cli.c
index 298d3b566..a28baeea6 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -163,6 +163,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;
}
@@ -424,7 +425,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 268cc80c8..ecd01e16c 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -489,7 +489,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))