]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
auto-create sounds dir
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 16 Oct 2007 17:30:42 +0000 (17:30 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 16 Oct 2007 17:30:42 +0000 (17:30 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5902 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core.c

index 8f80c25f195bf0095ab91d0db88b98bf638d9f07..a3ee8f0b9b8265f2bc8417f9fd8cdef6c4c5c1a1 100644 (file)
@@ -254,6 +254,7 @@ SWITCH_DECLARE(void) switch_core_launch_thread(switch_thread_start_t func, void
 
 SWITCH_DECLARE(void) switch_core_set_globals(void)
 {
+       char *dir_path;
 #define BUFSIZE 1024
 #ifdef WIN32
        char lpPathBuffer[BUFSIZE];
@@ -348,6 +349,12 @@ SWITCH_DECLARE(void) switch_core_set_globals(void)
 #endif
        }
 
+       
+       dir_path = switch_mprintf("%s%ssounds", SWITCH_GLOBAL_dirs.base_dir, SWITCH_PATH_SEPARATOR);
+       switch_dir_make_recursive(dir_path,
+                                                         SWITCH_FPROT_UREAD | SWITCH_FPROT_UWRITE | SWITCH_FPROT_UEXECUTE | SWITCH_FPROT_GREAD | SWITCH_FPROT_GEXECUTE,
+                                                         runtime.memory_pool);
+       switch_safe_free(dir_path);
 }