[Asterisk-code-review] Fixing app voicemail-VoiceMailPlayMsg (asterisk[14])

Ryan Rittgarn asteriskteam at digium.com
Mon Feb 13 09:41:32 CST 2017


Ryan Rittgarn has uploaded a new change for review. ( https://gerrit.asterisk.org/4934 )

Change subject: Fixing app_voicemail-VoiceMailPlayMsg
......................................................................

Fixing app_voicemail-VoiceMailPlayMsg

Removed extraneous make_file call, added
necessary call to RETRIEVE and cleaned up
after ourselves with DISPOSE

Change-Id: I1e122dd53c0f3d7faa10f3c2b7e7e76a47d51b8c
---
M apps/app_voicemail.c
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/34/4934/1

diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index fe76bc0..cc3e6fa 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -11206,7 +11206,6 @@
 	/* Found the msg, so play it back */
 
 	make_file(vms->fn, sizeof(vms->fn), vms->curdir, vms->curmsg);
-	make_file(vms->fn, sizeof(vms->fn), vms->curdir, vms->curmsg);
 
 #ifdef IMAP_STORAGE
 	/*IMAP storage stores any prepended message from a forward
@@ -11216,6 +11215,8 @@
 		wait_file(chan, vms, vms->introfn);
 	}
 #endif
+	RETRIEVE(vms->curdir,vms->curmsg,vmu->mailbox, vmu->context);
+
 	if ((wait_file(chan, vms, vms->fn)) < 0) {
 		ast_log(AST_LOG_WARNING, "Playback of message %s failed\n", vms->fn);
 	} else {
@@ -11227,7 +11228,7 @@
 		ast_mutex_unlock(&vms->lock);
 #endif
 	}
-
+	DISPOSE(vms->curdir, vms->curmsg);
 	return 0;
 }
 

-- 
To view, visit https://gerrit.asterisk.org/4934
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e122dd53c0f3d7faa10f3c2b7e7e76a47d51b8c
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Ryan Rittgarn <rrittgarn at techpro.com>



More information about the asterisk-code-review mailing list