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

switch_file_exists returns switch_status_t so you cannot assume it returns a…

switch_file_exists returns switch_status_t so you cannot assume it returns a true value since success is 0
上级 3d283acc
......@@ -1324,7 +1324,7 @@ static void cleanup_attachments(client_t *client)
for (hp = client->params->headers; hp; hp = hp->next) {
if (!strncasecmp(hp->name, "attach_file:", 12)) {
if (switch_file_exists(hp->value, client->pool)) {
if (switch_file_exists(hp->value, client->pool) == SWITCH_STATUS_SUCCESS) {
printf("DELETE %s\n", hp->value);
unlink(hp->value);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论