[Asterisk-cvs] asterisk/res res_monitor.c,1.21.2.1,1.21.2.2

russell at lists.digium.com russell at lists.digium.com
Thu Nov 4 21:43:46 CST 2004


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

Modified Files:
      Tag: v1-0
	res_monitor.c 
Log Message:
fix non standard characters (bug 2778)


Index: res_monitor.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_monitor.c,v
retrieving revision 1.21.2.1
retrieving revision 1.21.2.2
diff -u -d -r1.21.2.1 -r1.21.2.2
--- res_monitor.c	25 Oct 2004 17:57:25 -0000	1.21.2.1
+++ res_monitor.c	5 Nov 2004 02:45:59 -0000	1.21.2.2
@@ -103,7 +103,7 @@
 			/* try creating the directory just in case it doesn't exist */
 			if (directory) {
 				char *name = strdup(fname_base);
-				snprintf(tmp, sizeof(tmp), "mkdir -p %s",dirname(name));
+				snprintf(tmp, sizeof(tmp), "mkdir -p \"%s\"",dirname(name));
 				free(name);
 				system(tmp);
 			}
@@ -243,9 +243,9 @@
 				execute_args = "";
 			}
 			
-			snprintf(tmp, sizeof(tmp), "%s %s/%s-in.%s %s/%s-out.%s %s/%s.%s %s &", execute, dir, name, format, dir, name, format, dir, name, format,execute_args);
+			snprintf(tmp, sizeof(tmp), "%s \"%s/%s-in.%s\" \"%s/%s-out.%s\" \"%s/%s.%s\" %s &", execute, dir, name, format, dir, name, format, dir, name, format,execute_args);
 			if (delfiles) {
-				snprintf(tmp2,sizeof(tmp2), "( %s& rm -f %s/%s-* ) &",tmp, dir ,name); /* remove legs when done mixing */
+				snprintf(tmp2,sizeof(tmp2), "( %s& rm -f \"%s\"/%s-* ) &",tmp, dir ,name); /* remove legs when done mixing */
 				strncpy(tmp, tmp2, sizeof(tmp) - 1);
 			}
 			ast_verbose("monitor executing %s\n",tmp);




More information about the svn-commits mailing list