]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4407 --resolve
authorJeff Lenk <jeff@jefflenk.com>
Sun, 15 Jul 2012 18:38:30 +0000 (13:38 -0500)
committerJeff Lenk <jeff@jefflenk.com>
Sun, 15 Jul 2012 18:38:30 +0000 (13:38 -0500)
src/mod/event_handlers/mod_json_cdr/mod_json_cdr.c

index 36626461a5ac5df5079b1a1f6f3d958184ae54cf..e07871b88dfe69922a1a0f23682127583c280125 100644 (file)
@@ -130,6 +130,7 @@ static switch_status_t set_json_cdr_log_dirs()
                        if ((path = switch_safe_strdup(globals.base_log_dir))) {
                                switch_thread_rwlock_wrlock(globals.log_path_lock);
                                switch_safe_free(globals.log_dir);
+                               switch_dir_make_recursive(path, SWITCH_DEFAULT_DIR_PERMS, globals.pool);
                                globals.log_dir = path;
                                switch_thread_rwlock_unlock(globals.log_path_lock);
                        } else {
@@ -168,6 +169,7 @@ static switch_status_t set_json_cdr_log_dirs()
                        if ((path = switch_safe_strdup(globals.base_err_log_dir[err_dir_index]))) {
                                switch_thread_rwlock_wrlock(globals.log_path_lock);
                                switch_safe_free(globals.err_log_dir[err_dir_index]);
+                               switch_dir_make_recursive(path, SWITCH_DEFAULT_DIR_PERMS, globals.pool);
                                globals.err_log_dir[err_dir_index] = path;
                                switch_thread_rwlock_unlock(globals.log_path_lock);
                        } else {