From cecaa556c39c6de409a52868513f4c0b8378a9f6 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 9 Apr 2012 12:42:14 -0500 Subject: [PATCH] switch_file_exists returns switch_status_t so you cannot assume it returns a true value since success is 0 --- src/mod/applications/mod_httapi/mod_httapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/applications/mod_httapi/mod_httapi.c b/src/mod/applications/mod_httapi/mod_httapi.c index 2c93cf02bd..3db9c3fb04 100644 --- a/src/mod/applications/mod_httapi/mod_httapi.c +++ b/src/mod/applications/mod_httapi/mod_httapi.c @@ -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); }