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

Freeswitch SVN mikej at freeswitch.org
Tue Dec 18 13:30:05 EST 2007


Author: mikej
Date: Tue Dec 18 13:30:04 2007
New Revision: 6872

Modified:
   freeswitch/trunk/src/switch_xml.cpp

Log:
check unlink return

Modified: freeswitch/trunk/src/switch_xml.cpp
==============================================================================
--- freeswitch/trunk/src/switch_xml.cpp	(original)
+++ freeswitch/trunk/src/switch_xml.cpp	Tue Dec 18 13:30:04 2007
@@ -1700,7 +1700,9 @@
 
 	if (xml->free_path) {
 		if (!switch_stristr("freeswitch.xml.fsxml", xml->free_path)) {
-			unlink(xml->free_path);
+			if (unlink(xml->free_path) != 0) {
+				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "failed to delete file [%s]\n", xml->free_path);
+			}
 		}
 		switch_safe_free(xml->free_path);
 	}



More information about the Freeswitch-svn mailing list