summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2008-02-15 22:56:14 +0000
committerMark Michelson <mmichelson@digium.com>2008-02-15 22:56:14 +0000
commit30c0e089f65a878fbb6bde59acfa8e3a50a6ed21 (patch)
treebe00912acb2b48d5d3ebfcbaa4f6e8c3577d2787 /apps/app_voicemail.c
parent75fd299f1b118e29c1f9231fd90a472bdf4c0ed0 (diff)
Fix redeclaration of variables when using IMAP storage
(closes issue #11988) Reported by: jaroth Patches: variable_cleanup.patch uploaded by jaroth (license 50) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index f0eef844c..987d66675 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -4422,12 +4422,6 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
long duration = 0;
char origmsgfile[PATH_MAX], msgfile[PATH_MAX];
struct vm_state vmstmp;
-#ifdef IMAP_STORAGE
- char *myserveremail = serveremail;
- char buf[1024] = "";
- int attach_user_voicemail = ast_test_flag((&globalflags), VM_ATTACH);
-#endif
-
memcpy(&vmstmp, vms, sizeof(vmstmp));
make_file(origmsgfile, sizeof(origmsgfile), dir, curmsg);
@@ -4443,8 +4437,9 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
if (!cmd) {
AST_LIST_TRAVERSE_SAFE_BEGIN(&extensions, vmtmp, list) {
#ifdef IMAP_STORAGE
- char *myserveremail;
+ char *myserveremail = serveremail;
int attach_user_voicemail;
+ char buf[1024] = "";
/* Need to get message content */
ast_debug(3, "Before mail_fetchheaders, curmsg is: %d, imap messages is %lu\n", vms->curmsg, vms->msgArray[vms->curmsg]);