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
This commit is contained in:
Tilghman Lesher
2008-02-29 14:34:34 +00:00
parent 837d4676dd
commit 8bf705f519

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