From: Michael Jerris Date: Fri, 4 Jan 2008 01:49:26 +0000 (+0000) Subject: check return from unlink. X-Git-Tag: v1.0-rc1~817 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=721b850699f7677e77ca15efbf632f65ee5e4877;p=thirdparty%2Ffreeswitch.git check return from unlink. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7080 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index 9b00e2d68a..ec3ade8e49 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -903,7 +903,9 @@ record_file: 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;