summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2005-11-12 02:34:01 +0000
committerKevin P. Fleming <kpfleming@digium.com>2005-11-12 02:34:01 +0000
commit3b8c82543d12e2edad1bb1362952461a525ca1fc (patch)
tree3d5611b98cf8cbd372783f228e003f7fb2323af9 /apps
parent50ab28bd94a8a2dd058871b40f4a8824922de27e (diff)
issue #5718
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_voicemail.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 0ed74f88a..c8a694c39 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3479,10 +3479,16 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
ast_log(LOG_DEBUG, "%s", sys);
ast_safe_system(sys);
- if ( (res = count_messages(receiver, todir)) )
+ res = count_messages(receiver, todir);
+
+ if ( (res == ERROR_LOCK_PATH) || (res < 0) ) {
+ if (res == ERROR_LOCK_PATH)
+ ast_log(LOG_WARNING, "Unable to lock the directory %s to forward the requested vmail msg!\n", todir);
+ else
+ ast_log(LOG_WARNING, "Unable to determine how many msgs are in the destination folder!\n");
break;
- else
- todircount = res;
+ }
+ todircount = res;
ast_copy_string(tmp, fmt, sizeof(tmp));
stringp = tmp;
while ((s = strsep(&stringp, "|"))) {
@@ -3547,8 +3553,7 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
res = ast_play_and_wait(chan, "vm-messages");
if (!res)
res = ast_play_and_wait(chan, "vm-saved"); */
- if (!res)
- res = ast_play_and_wait(chan, "vm-msgsaved");
+ res = ast_play_and_wait(chan, "vm-msgsaved");
}
}
}