Merged revisions 103726 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Fri, 15 Feb 2008 18:34:42 +0000 (18:34 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 15 Feb 2008 18:34:42 +0000 (18:34 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103726 | russell | 2008-02-15 12:33:29 -0600 (Fri, 15 Feb 2008) | 6 lines

Don't attempt to execute the reload callback for a module that returned
AST_MODULE_LOAD_DECLINE.  This fixes a crash that was reported against
chan_console in trunk.

(closes issue #11953, reported by junky, fixed by me)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103727 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/loader.c

index 3b73f43..08139af 100644 (file)
@@ -589,7 +589,7 @@ int ast_module_reload(const char *name)
                if (name && resource_name_match(name, cur->resource))
                        continue;
 
-               if (!(cur->flags.running || cur->flags.declined))
+               if (!cur->flags.running || cur->flags.declined)
                        continue;
 
                if (!info->reload) {    /* cannot be reloaded */