aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-01 19:21:30 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-01 19:21:30 +0000
commit277c4886502663bcfb7248615262d1fdcea97eb9 (patch)
tree243677a3cf4697da4dbdd083c3708bdda095a9e7 /res/res_musiconhold.c
parent0d2c199ecadc029a08dbe799e39f0450e9360989 (diff)
Merged revisions 38654 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38654 | file | 2006-08-01 15:20:05 -0400 (Tue, 01 Aug 2006) | 2 lines 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/trunk@38655 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_musiconhold.c')
-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 b777ccd2d..b4b6272f1 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -195,6 +195,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);