Revision
15247
Author
mikej
Date
2009-10-27 09:01:13 -0500 (Tue, 27 Oct 2009)

Log Message

fix regression from -run addition and better handling of -stop whoops (FSCORE-474)

Modified Paths

Diff

Modified: freeswitch/trunk/src/switch.c (15246 => 15247)


--- freeswitch/trunk/src/switch.c	2009-10-27 11:33:58 UTC (rev 15246)
+++ freeswitch/trunk/src/switch.c	2009-10-27 14:01:13 UTC (rev 15247)
@@ -635,6 +635,11 @@
 	}
 	
 	if (log_set && !run_set) {
+		SWITCH_GLOBAL_dirs.run_dir = (char *) malloc(strlen(SWITCH_GLOBAL_dirs.log_dir) + 1);
+		if (!SWITCH_GLOBAL_dirs.run_dir) {
+			fprintf(stderr, "Allocation error\n");
+			return 255;
+		}
 		strcpy(SWITCH_GLOBAL_dirs.run_dir, SWITCH_GLOBAL_dirs.log_dir);
 	}