Author: kmoore
Date: Fri Sep  5 08:28:13 2014
New Revision: 422646

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=422646
Log:
Menuselect: Fix incorrect enabling on failed deps

This corrects a situation where menuselect can incorrectly enable a
module by default that has defaultenabled set to "no" and has
failed/non-selected dependencies. The bug is due to an inverted test
when checking for whether the given module should be set to enabled by
default on load.

Review: https://reviewboard.asterisk.org/r/3975/
Reported by: John Bigelow

Modified:
    branches/13/menuselect/menuselect.c

Modified: branches/13/menuselect/menuselect.c
URL: 
http://svnview.digium.com/svn/asterisk/branches/13/menuselect/menuselect.c?view=diff&rev=422646&r1=422645&r2=422646
==============================================================================
--- branches/13/menuselect/menuselect.c (original)
+++ branches/13/menuselect/menuselect.c Fri Sep  5 08:28:13 2014
@@ -459,7 +459,7 @@
 
        if (!cat->positive_output) {
                mem->enabled = 1;
-               if (!(mem->defaultenabled && strcasecmp(mem->defaultenabled, 
"no"))) {
+               if (!mem->defaultenabled || strcasecmp(mem->defaultenabled, 
"no")) {
                        mem->was_enabled = 1;
                        print_debug("Enabled %s because the category does not 
have positive output\n", mem->name);
                }


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to