[svn-commits] tilghman: trunk r742 - in /trunk: menuselect.c menuselect.h
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Apr 12 12:16:45 CDT 2010
Author: tilghman
Date: Mon Apr 12 12:16:41 2010
New Revision: 742
URL: http://svnview.digium.com/svn/menuselect?view=rev&rev=742
Log:
Create a category which can only be enabled explicitly.
Reviewboard: https://reviewboard.asterisk.org/r/506/
Modified:
trunk/menuselect.c
trunk/menuselect.h
Modified: trunk/menuselect.c
URL: http://svnview.digium.com/svn/menuselect/trunk/menuselect.c?view=diff&rev=742&r1=741&r2=742
==============================================================================
--- trunk/menuselect.c (original)
+++ trunk/menuselect.c Mon Apr 12 12:16:41 2010
@@ -248,6 +248,7 @@
{
struct category *cat;
struct category *newcat;
+ char *explicitly_enabled_only;
if (!(cat = calloc(1, sizeof(*cat))))
return -1;
@@ -284,6 +285,10 @@
mem->displayname = mxmlElementGetAttr(cur2, "displayname");
mem->touch_on_change = mxmlElementGetAttr(cur2, "touch_on_change");
mem->remove_on_change = mxmlElementGetAttr(cur2, "remove_on_change");
+
+ if ((tmp = mxmlElementGetAttr(cur2, "explicitly_enabled_only"))) {
+ mem->explicitly_enabled_only = !strcasecmp(tmp, "yes");
+ }
if (!cat->positive_output) {
mem->was_enabled = mem->enabled = 1;
@@ -815,6 +820,11 @@
}
if (dep->member->depsfailed == HARD_FAILURE) {
+ can_enable = 0;
+ break;
+ }
+
+ if (dep->member->explicitly_enabled_only) {
can_enable = 0;
break;
}
Modified: trunk/menuselect.h
URL: http://svnview.digium.com/svn/menuselect/trunk/menuselect.h?view=diff&rev=742&r1=741&r2=742
==============================================================================
--- trunk/menuselect.h (original)
+++ trunk/menuselect.h Mon Apr 12 12:16:41 2010
@@ -100,6 +100,9 @@
we have included it in the MENUSELECT_BUILD_DEPS line
in the output file */
unsigned int build_deps_output:1;
+ /*! This module should never be enabled automatically, but only
+ * when explicitly set. */
+ unsigned int explicitly_enabled_only:1;
/*! dependencies of this module */
AST_LIST_HEAD_NOLOCK(, depend) deps;
/*! conflicts of this module */
More information about the svn-commits
mailing list