[Freeswitch-svn] [commit] r9538 - freeswitch/trunk/src/mod/applications/mod_voicemail

Freeswitch SVN brian at freeswitch.org
Fri Sep 12 11:29:53 EDT 2008


Author: brian
Date: Fri Sep 12 11:29:53 2008
New Revision: 9538

Modified:
   freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c

Log:
check return value of unlink MODAPP-142

Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	Fri Sep 12 11:29:53 2008
@@ -1253,7 +1253,9 @@
 
 	}
 
-	unlink(announce);
+	if (unlink(announce) != 0) {
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "failed to delete file [%s]\n", announce);
+	}
 	ret = tmp_path;
 	
  end:
@@ -1496,7 +1498,9 @@
   end:
 
 	if (forward_file_path) {
-		unlink(forward_file_path);
+		if (unlink(forward_file_path) != 0) {
+			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "failed to delete file [%s]\n", forward_file_path);
+		}
 	}
 
 	return status;



More information about the Freeswitch-svn mailing list