fix regression from -run addition and better handling of -stop whoops (FSCORE-474)
--- 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);
}