mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-16 03:42:09 +00:00
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:
parent
3d283accf2
commit
cecaa556c3
@ -1324,7 +1324,7 @@ static void cleanup_attachments(client_t *client)
|
|||||||
|
|
||||||
for (hp = client->params->headers; hp; hp = hp->next) {
|
for (hp = client->params->headers; hp; hp = hp->next) {
|
||||||
if (!strncasecmp(hp->name, "attach_file:", 12)) {
|
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);
|
printf("DELETE %s\n", hp->value);
|
||||||
unlink(hp->value);
|
unlink(hp->value);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user