From 2c27e35d2120f470dd75543934007a499cfb5a12 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 1 Aug 2006 20:03:13 +0000 Subject: automerge commit git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@38675 f38db490-d61c-443f-a65b-d21fe96a405b --- res/res_musiconhold.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'res') 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); -- cgit v1.2.3