[Freeswitch-svn] [commit] r4028 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Mon Jan 22 21:22:45 EST 2007


Author: mikej
Date: Mon Jan 22 21:22:45 2007
New Revision: 4028

Modified:
   freeswitch/trunk/src/switch_xml.c

Log:
change new xml stuff to use path sep define, and to set file mode on open for write.

Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c	(original)
+++ freeswitch/trunk/src/switch_xml.c	Mon Jan 22 21:22:45 2007
@@ -856,11 +856,11 @@
     }
 
     if (new_fd < 0) {
-        if (!(new_file = switch_mprintf("%s/freeswitch.registry", SWITCH_GLOBAL_dirs.log_dir))) {
+        if (!(new_file = switch_mprintf("%s%sfreeswitch.registry", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR))) {
             goto done;
         }
 
-        if ((new_fd = open(new_file, O_WRONLY | O_CREAT | O_TRUNC, 0)) < 0) {
+        if ((new_fd = open(new_file, O_WRONLY | O_CREAT | O_TRUNC, 700)) < 0) {
             goto done;
         }
         close_fd = new_fd;



More information about the Freeswitch-svn mailing list