aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-09 18:53:46 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-09 18:53:46 +0000
commit87af6389dbfd9ad09a09f59f16ef1a93f6da492a (patch)
treee34b9b9f79d2c99e32826c61b346c39276efbef3 /apps
parent34624c527c45e52ac3adcb72715cdf8602ab94e1 (diff)
Issue 6919 - clarify error message
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18603 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 901747c30..e44323d18 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1697,9 +1697,8 @@ static int sendmail(char *srcemail, struct ast_vm_user *vmu, int msgnum, char *c
ast_log(LOG_DEBUG, "Attaching file '%s', format '%s', uservm is '%d', global is %d\n", attach, format, attach_user_voicemail, ast_test_flag((&globalflags), VM_ATTACH));
/* Make a temporary file instead of piping directly to sendmail, in case the mail
command hangs */
- p = vm_mkftemp(tmp);
- if (p == NULL) {
- ast_log(LOG_WARNING, "Unable to launch '%s'\n", mailcmd);
+ if ((p = vm_mkftemp(tmp)) == NULL) {
+ ast_log(LOG_WARNING, "Unable to launch '%s' (can't create temporary file)\n", mailcmd);
return -1;
} else {
gethostname(host, sizeof(host)-1);
@@ -1817,10 +1816,10 @@ static int sendpage(char *srcemail, char *pager, int msgnum, char *context, char
char tmp[80] = "/tmp/astmail-XXXXXX";
char tmp2[256];
struct tm tm;
- FILE *p = vm_mkftemp(tmp);
+ FILE *p;
- if (p == NULL) {
- ast_log(LOG_WARNING, "Unable to launch '%s'\n", mailcmd);
+ if ((p = vm_mkftemp(tmp)) == NULL) {
+ ast_log(LOG_WARNING, "Unable to launch '%s' (can't create temporary file)\n", mailcmd);
return -1;
} else {
gethostname(host, sizeof(host)-1);