[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-commits
Subject:    [asterisk-commits] tilghman: branch 1.4 r105296 -
From:       SVN commits to the Asterisk project <asterisk-commits () lists ! digium ! com>
Date:       2008-02-29 14:34:35
Message-ID: 20080229143436.29A84A9DA24 () lists ! digium ! internal
[Download RAW message or body]

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")))


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic