[Asterisk-cvs] asterisk pbx.c,1.245,1.246

russell at lists.digium.com russell at lists.digium.com
Thu May 26 11:46:47 CDT 2005


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

Modified Files:
	pbx.c 
Log Message:
fix return value for ExecIfTime when time is outside of the specified range (bug #4380)


Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.245
retrieving revision 1.246
diff -u -d -r1.245 -r1.246
--- pbx.c	18 May 2005 01:49:12 -0000	1.245
+++ pbx.c	26 May 2005 15:50:50 -0000	1.246
@@ -5443,7 +5443,12 @@
 		ptr2 = ptr1;
 		/* Separate the Application data ptr1 is the time spec ptr2 is the app|data*/
 		strsep(&ptr2,"?");
-		if (ast_build_timing(&timing, ptr1) && ast_check_timing(&timing)) {
+		if(!(res = ast_build_timing(&timing, ptr1))) {
+			ast_log(LOG_WARNING, "Invalid Time Spec: %s\nCorrect usage: %s\n", ptr1, usage);
+			res = -1;
+		}
+		
+		if (!res && ast_check_timing(&timing)) {
 			if (ptr2) {
 				/* ptr2 is now the app name 
 				   we're done with ptr1 now so recycle it and use it to point to the app args*/
@@ -5461,9 +5466,6 @@
 			} else {
 				ast_log(LOG_WARNING, "%s\n", usage);
 			}
-		} else {
-			ast_log(LOG_WARNING, "Invalid Time Spec: %s\nCorrect usage: %s\n", ptr1, usage);
-			res = -1;
 		}
 	} else {
 		ast_log(LOG_ERROR, "Memory Error!\n");




More information about the svn-commits mailing list