[Asterisk-cvs] asterisk manager.c,1.109,1.110

kpfleming kpfleming
Fri Aug 26 19:02:41 CDT 2005


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv9708

Modified Files:
	manager.c 
Log Message:
ensure that 'Events: On' enables all event types (issue #5016)


Index: manager.c
===================================================================
RCS file: /usr/cvsroot/asterisk/manager.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- manager.c	7 Aug 2005 22:59:04 -0000	1.109
+++ manager.c	26 Aug 2005 23:04:20 -0000	1.110
@@ -395,19 +395,21 @@
 
 static int ast_strings_to_mask(char *string) 
 {
-	int x = 0, ret = -1;
+	int x, ret = -1;
 	
 	x = ast_is_number(string);
 
-	if (x) 
+	if (x) {
 		ret = x;
-	else if (!string || ast_strlen_zero(string))
+	} else if (!string || ast_strlen_zero(string)) {
 		ret = -1;
-	else if (!strcasecmp(string, "off") || ast_false(string))
+	} else if (ast_false(string)) {
 		ret = 0;
-	else if (!strcasecmp(string, "on") || ast_true(string))
-		ret = 1;
-	else {
+	} else if (ast_true(string)) {
+		ret = 0;
+		for (x=0; x<sizeof(perms) / sizeof(perms[0]); x++)
+			ret |= perms[x].num;		
+	} else {
 		ret = 0;
 		for (x=0; x<sizeof(perms) / sizeof(perms[0]); x++) {
 			if (ast_instring(string, perms[x].label, ',')) 




More information about the svn-commits mailing list