FS-4097 --resolve

This commit is contained in:
Anthony Minessale 2012-04-10 08:05:09 -05:00
parent fa011be523
commit e31389ac9c
1 changed files with 5 additions and 4 deletions

View File

@ -758,10 +758,6 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
rval = SWITCH_FALSE;
}
if (unlink(filename) != 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", filename);
}
if (zstr(err)) {
if (file) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Emailed file [%s] to [%s]\n", filename, to);
@ -777,6 +773,11 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
if (fd > -1) {
close(fd);
}
if (unlink(filename) != 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", filename);
}
if (ifd > -1) {
close(ifd);
}