Index: main/loader.c =================================================================== --- main/loader.c (revision 261865) +++ main/loader.c (working copy) @@ -490,7 +490,7 @@ 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)) Index: main/cli.c =================================================================== --- main/cli.c (revision 261865) +++ main/cli.c (working copy) @@ -263,6 +263,7 @@ 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 @@ 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; }