From: Kinsey Moore Date: Wed, 10 Aug 2011 13:47:46 +0000 (+0000) Subject: AMI action ModuleReload returns Error if Module: missing or empty X-Git-Tag: 1.8.6.0-rc1~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43a5273659de0fc43d03ad02bd073a1c6b9c4150;p=thirdparty%2Fasterisk.git AMI action ModuleReload returns Error if Module: missing or empty An empty string was not being checked for properly causing identification of the module to be reloaded to fail and return an Error with message "No such module." (closes issue AST-616) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@331315 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/manager.c b/main/manager.c index 77029dedec..46f3f6a965 100644 --- a/main/manager.c +++ b/main/manager.c @@ -4439,7 +4439,7 @@ static int manager_moduleload(struct mansession *s, const struct message *m) astman_send_ack(s, m, "Module unloaded."); } } else if (!strcasecmp(loadtype, "reload")) { - if (module != NULL) { + if (!ast_strlen_zero(module)) { res = ast_module_reload(module); if (res == 0) { astman_send_error(s, m, "No such module.");