]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix randomness. save_pos was being set to 0 initially instead of -1, causing it to...
authorJoshua Colp <jcolp@digium.com>
Mon, 1 Oct 2007 13:57:42 +0000 (13:57 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 1 Oct 2007 13:57:42 +0000 (13:57 +0000)
(closes issue #10859)
Reported by: jamesgolovich
Patches:
      asterisk-mohpos2.diff.txt uploaded by jamesgolovich (license 176)

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

res/res_musiconhold.c

index 8949317d32d862f013dbffe04f590acd0e34986d..bc6273f30d4f68e74a8eefbb35b04dc13e56158c 100644 (file)
@@ -312,6 +312,7 @@ static void *moh_files_alloc(struct ast_channel *chan, void *params)
        if (!chan->music_state && (state = ast_calloc(1, sizeof(*state)))) {
                chan->music_state = state;
                state->class = class;
+               state->save_pos = -1;
        } else 
                state = chan->music_state;