[Freeswitch-trunk] [commit] r13653 - freeswitch/trunk/src/mod/xml_int/mod_xml_cdr

FreeSWITCH SVN mikej at freeswitch.org
Fri Jun 5 13:57:40 PDT 2009


Author: mikej
Date: Fri Jun  5 15:57:40 2009
New Revision: 13653

Log:
fix msvc build error

Modified:
   freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c

Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c	(original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c	Fri Jun  5 15:57:40 2009
@@ -113,7 +113,11 @@
 
 	if (!switch_strlen_zero(logdir)) {
 		if ((path = switch_mprintf("%s%s%s%s.cdr.xml", logdir, SWITCH_PATH_SEPARATOR, a_prefix, switch_core_session_get_uuid(session)))) {
+#ifdef _MSC_VER
+			if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) > -1) {
+#else
 			if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR| S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) > -1) {
+#endif
 				int wrote;
 				wrote = write(fd, xml_text, (unsigned) strlen(xml_text));
 				close(fd);
@@ -222,7 +226,11 @@
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to post to web server, writing to file\n");
 
 		if ((path = switch_mprintf("%s%s%s%s.cdr.xml", globals.err_log_dir, SWITCH_PATH_SEPARATOR, a_prefix, switch_core_session_get_uuid(session)))) {
+#ifdef _MSC_VER
+			if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) > -1) {
+#else
 			if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) > -1) {
+#endif
 				int wrote;
 				wrote = write(fd, xml_text, (unsigned) strlen(xml_text));
 				close(fd);



More information about the Freeswitch-trunk mailing list