From: Tilghman Lesher Date: Fri, 29 Feb 2008 14:34:34 +0000 (+0000) Subject: If the message file does not exist, just return harmlessly, instead of crashing. X-Git-Tag: 1.4.19~115 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8bf705f51953e445069822ad1864237a847e4b52;p=thirdparty%2Fasterisk.git If the message file does not exist, just return harmlessly, instead of crashing. (Closes issue #12108) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105296 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index dc7006b2e1..74bfd2c9a3 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3845,7 +3845,9 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu, 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")))