]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix regression from -run addition and better handling of -stop whoops (FSCORE-474)
authorMichael Jerris <mike@jerris.com>
Tue, 27 Oct 2009 14:01:13 +0000 (14:01 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 27 Oct 2009 14:01:13 +0000 (14:01 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15247 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch.c

index daa887dfba857f53d04a8650f06c78a7a350723d..e758117f6cf038a782c70c747d7c02021edaff21 100644 (file)
@@ -635,6 +635,11 @@ int main(int argc, char *argv[])
        }
        
        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);
        }