From: Kinsey Moore Date: Fri, 5 Sep 2014 13:29:38 +0000 (+0000) Subject: Menuselect: Fix incorrect enabling on failed deps X-Git-Tag: 14.0.0-beta1~1686 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2362d88a18678afffda915d94e452b7e9e4d03d3;p=thirdparty%2Fasterisk.git 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 ........ Merged revisions 422646 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422647 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/menuselect/menuselect.c b/menuselect/menuselect.c index 6491d69385..f4a826b842 100644 --- a/menuselect/menuselect.c +++ b/menuselect/menuselect.c @@ -459,7 +459,7 @@ static int process_xml_member_node(xmlNode *node, struct category *cat) 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); }