[asterisk-commits] pabelanger: trunk r262800 - in /trunk/main: cli.c loader.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 12 14:59:20 CDT 2010


Author: pabelanger
Date: Wed May 12 14:59:16 2010
New Revision: 262800

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=262800
Log:
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

Modified:
    trunk/main/cli.c
    trunk/main/loader.c

Modified: trunk/main/cli.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/cli.c?view=diff&rev=262800&r1=262799&r2=262800
==============================================================================
--- trunk/main/cli.c (original)
+++ trunk/main/cli.c Wed May 12 14:59:16 2010
@@ -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;
 }
 

Modified: trunk/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/loader.c?view=diff&rev=262800&r1=262799&r2=262800
==============================================================================
--- trunk/main/loader.c (original)
+++ trunk/main/loader.c Wed May 12 14:59:16 2010
@@ -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))




More information about the asterisk-commits mailing list