aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-29 14:34:34 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-29 14:34:34 +0000
commit3cc2462e7b78135e24de46b06b814614df85b1f3 (patch)
tree897df271019e8b2c763590e07b8d9be4298dcd54
parent67e45fa331fac447ef3d5c6bfe27177370b4c78d (diff)
If the message file does not exist, just return harmlessly, instead of crashing.
(Closes issue #12108) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@105296 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_voicemail.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index dc7006b2e..74bfd2c9a 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")))