]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Close the stream when file based MOH stop. This won't get rid of their position in...
authorJoshua Colp <jcolp@digium.com>
Tue, 1 Aug 2006 19:20:05 +0000 (19:20 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 1 Aug 2006 19:20:05 +0000 (19:20 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38654 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_musiconhold.c

index faa823e1081d221ca8ae5b4431471f9ea2892d3f..01d8a57d6d05265cc4c756a547015e8680a068a0 100644 (file)
@@ -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);