提交 e31389ac authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-4097 --resolve

上级 fa011be5
...@@ -758,10 +758,6 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to, ...@@ -758,10 +758,6 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
rval = SWITCH_FALSE; 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 (zstr(err)) {
if (file) { if (file) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Emailed file [%s] to [%s]\n", filename, to); 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, ...@@ -777,6 +773,11 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
if (fd > -1) { if (fd > -1) {
close(fd); 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) { if (ifd > -1) {
close(ifd); close(ifd);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论