[core] fix cannot open error in switch_simple_email()
This commit is contained in:
parent
f9bb8940c2
commit
5e3b08d95f
|
@ -1170,7 +1170,7 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
|
||||||
if (file) {
|
if (file) {
|
||||||
if ((ifd = open(file, O_RDONLY | O_BINARY)) < 0) {
|
if ((ifd = open(file, O_RDONLY | O_BINARY)) < 0) {
|
||||||
rval = SWITCH_FALSE;
|
rval = SWITCH_FALSE;
|
||||||
err = "Cannot open tmp file\n";
|
err = "Cannot open file\n";
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1288,6 +1288,10 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
err = "cannot open tmp file\n";
|
||||||
|
rval = SWITCH_FALSE;
|
||||||
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fd > -1) {
|
if (fd > -1) {
|
||||||
|
|
Loading…
Reference in New Issue