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

Freeswitch SVN mikej at freeswitch.org
Thu Jan 3 20:49:26 EST 2008


Author: mikej
Date: Thu Jan  3 20:49:26 2008
New Revision: 7080

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

Log:
check return from unlink.

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	Thu Jan  3 20:49:26 2008
@@ -903,7 +903,9 @@
 		if ((*message_len = fh.sample_count / read_codec->implementation->actual_samples_per_second) < profile->min_record_len) {
             switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Message is less than minimum record length: %d, discarding it.\n", 
                               profile->min_record_len);
-            unlink(file_path);
+			if (unlink(file_path) != 0) {
+				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "failed to delete file [%s]\n", file_path);
+			}
             goto record_file;
         } else {
             status = SWITCH_STATUS_SUCCESS;



More information about the Freeswitch-svn mailing list