[asterisk-commits] trunk r18603 - /trunk/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Apr 9 11:53:49 MST 2006


Author: oej
Date: Sun Apr  9 13:53:46 2006
New Revision: 18603

URL: http://svn.digium.com/view/asterisk?rev=18603&view=rev
Log:
Issue 6919 - clarify error message

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=18603&r1=18602&r2=18603&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Sun Apr  9 13:53:46 2006
@@ -1697,9 +1697,8 @@
 	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 @@
 	char tmp[80] = "/tmp/astmail-XXXXXX";
 	char tmp2[256];
 	struct tm tm;
-	FILE *p = vm_mkftemp(tmp);
-
-	if (p == NULL) {
-		ast_log(LOG_WARNING, "Unable to launch '%s'\n", mailcmd);
+	FILE *p;
+
+	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);



More information about the asterisk-commits mailing list