aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-01 13:57:42 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-01 13:57:42 +0000
commitcef62a789549a36796003c615c639122df7a70db (patch)
tree504236ab72ec176e6f3e3d00e9893bdbd0a76939
parenta725a69bd0ec42bfa167ab64fe75f3beadf33672 (diff)
Fix randomness. save_pos was being set to 0 initially instead of -1, causing it to jump to position 0 when moh started.
(closes issue #10859) Reported by: jamesgolovich Patches: asterisk-mohpos2.diff.txt uploaded by jamesgolovich (license 176) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84160 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--res/res_musiconhold.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 8949317d3..bc6273f30 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -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;