switch_file_exists returns switch_status_t so you cannot assume it returns a true value since success is 0

This commit is contained in:
Anthony Minessale 2012-04-09 12:42:14 -05:00
parent 3d283accf2
commit cecaa556c3
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}