]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
check unlink return
authorMichael Jerris <mike@jerris.com>
Tue, 18 Dec 2007 18:30:04 +0000 (18:30 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 18 Dec 2007 18:30:04 +0000 (18:30 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6872 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_xml.cpp

index 4c0b3d2c9be109daaade5f1f6d65dcc1a1501697..e8d38b33c0f0d04375d1f61c66e03ad958495920 100644 (file)
@@ -1700,7 +1700,9 @@ SWITCH_DECLARE(void) switch_xml_free(switch_xml_t xml)
 
        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);
        }