]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Stop playing the message number multiple times.
authorJason Parker <jparker@digium.com>
Mon, 8 Feb 2010 23:51:44 +0000 (23:51 +0000)
committerJason Parker <jparker@digium.com>
Mon, 8 Feb 2010 23:51:44 +0000 (23:51 +0000)
Also remove some accidentally duplicated code, which may have been causing a memleak.
This was caused by a bad merge.

(closes issue #16579)
Reported by: kue
Patches:
      0016525.patch uploaded by hokie21 (license 987)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@245627 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 881f33f35eaff6745d9f4be5d1061594d094e4f0..53d6b5e7524522de07fc62dd88eea3176cdb7268 100644 (file)
@@ -6176,14 +6176,6 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
        else if (vms->curmsg == vms->lastmsg)
                res = wait_file2(chan, vms, "vm-last");         /* "last" */
 
-       snprintf(filename, sizeof(filename), "%s.txt", vms->fn);
-       RETRIEVE(vms->curdir, vms->curmsg, vmu->mailbox, vmu->context);
-       msg_cfg = ast_config_load(filename, config_flags);
-       if (!msg_cfg) {
-               ast_log(LOG_WARNING, "No message attribute file?!! (%s)\n", filename);
-               return 0;
-       }
-
        /* POLISH syntax */
        if (!strncasecmp(chan->language, "pl", 2)) {
                if (vms->curmsg && (vms->curmsg != vms->lastmsg)) {
@@ -6231,11 +6223,6 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
                        if (!res) {
                                res = ast_say_number(chan, vms->curmsg + 1, AST_DIGIT_ANY, chan->language, NULL);
                        }
-                       if (vms->curmsg && (vms->curmsg != vms->lastmsg)) {
-                               if (!res) {
-                                       res = ast_say_number(chan, vms->curmsg + 1, AST_DIGIT_ANY, chan->language, NULL);
-                               }
-                       }
                }
        }