aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-01 19:20:05 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-01 19:20:05 +0000
commit71c993303b7625c29438c3dacaea33f4ac495f0e (patch)
treeb12940639b10d2cc305594293bca94eff76a09f2 /res
parente9cd74efc4981c417a355d78351a14cc4487f924 (diff)
Close the stream when file based MOH stop. This won't get rid of their position in the file but it will cause the translation path to be setup again. (issue #7634 reported by asimpson)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@38654 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_musiconhold.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index faa823e10..01d8a57d6 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -180,6 +180,10 @@ static void moh_files_release(struct ast_channel *chan, void *data)
struct moh_files_state *state = chan->music_state;
if (chan && state) {
+ if (chan->stream) {
+ ast_closestream(chan->stream);
+ chan->stream = NULL;
+ }
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Stopped music on hold on %s\n", chan->name);