]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If the message file does not exist, just return harmlessly, instead of crashing.
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 29 Feb 2008 14:34:34 +0000 (14:34 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 29 Feb 2008 14:34:34 +0000 (14:34 +0000)
(Closes issue #12108)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105296 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index dc7006b2e1481f40f45eef9f8e281ac9d1de0dc5..74bfd2c9a3c2e2b74522fcd3c986f38f27787231 100644 (file)
@@ -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")))