[Asterisk-cvs] asterisk app.c,1.74,1.75

kpfleming kpfleming
Wed Sep 14 13:21:54 CDT 2005


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

Modified Files:
	app.c 
Log Message:
use a better name for structure element (when using named initializers)


Index: app.c
===================================================================
RCS file: /usr/cvsroot/asterisk/app.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- app.c	7 Sep 2005 21:01:31 -0000	1.74
+++ app.c	14 Sep 2005 17:20:24 -0000	1.75
@@ -1506,27 +1506,30 @@
 	int argloc;
 	char *arg;
 	int res = 0;
+
 	flags->flags = 0;
+
 	if (!optstr)
 		return 0;
+
 	s = optstr;
-	while(*s) {
+	while (*s) {
 		curarg = *s & 0x7f;
 		flags->flags |= options[curarg].flag;
-		argloc = options[curarg].argoption;
+		argloc = options[curarg].arg_index;
 		s++;
 		if (*s == '(') {
 			/* Has argument */
 			s++;
 			arg = s;
-			while(*s && (*s != ')')) s++;
+			while (*s && (*s != ')')) s++;
 			if (*s) {
 				if (argloc)
 					args[argloc - 1] = arg;
 				*s = '\0';
 				s++;
 			} else {
-				ast_log(LOG_WARNING, "Missing closing parenthesis for argument '%c'\n", curarg);
+				ast_log(LOG_WARNING, "Missing closing parenthesis for argument '%c' in string '%s'\n", curarg, arg);
 				res = -1;
 			}
 		} else if (argloc)
@@ -1534,4 +1537,3 @@
 	}
 	return res;
 }
-




More information about the svn-commits mailing list