[asterisk-commits] tilghman: branch 1.4 r105296 - /branches/1.4/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 29 08:34:35 CST 2008


Author: tilghman
Date: Fri Feb 29 08:34:34 2008
New Revision: 105296

URL: http://svn.digium.com/view/asterisk?view=rev&rev=105296
Log:
If the message file does not exist, just return harmlessly, instead of crashing.
(Closes issue #12108)

Modified:
    branches/1.4/apps/app_voicemail.c

Modified: branches/1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_voicemail.c?view=diff&rev=105296&r1=105295&r2=105296
==============================================================================
--- branches/1.4/apps/app_voicemail.c (original)
+++ branches/1.4/apps/app_voicemail.c Fri Feb 29 08:34:34 2008
@@ -3845,7 +3845,9 @@
 	strncat(textfile, ".txt", sizeof(textfile) - 1);
 	strncat(backup, "-bak", sizeof(backup) - 1);
 
-	msg_cfg = ast_config_load(textfile);
+	if (!(msg_cfg = ast_config_load(textfile))) {
+		return -1;
+	}
 
 	*duration = 0;
 	if ((duration_str = ast_variable_retrieve(msg_cfg, "message", "duration")))




More information about the asterisk-commits mailing list