summaryrefslogtreecommitdiff
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
authorJason Parker <jparker@digium.com>2011-02-01 17:05:38 +0000
committerJason Parker <jparker@digium.com>2011-02-01 17:05:38 +0000
commit20fefec7a34d12f86f748baeaa1082ac69cbe8f5 (patch)
tree7ffacb19a229238929df711a87454a5026936ad6 /res/res_musiconhold.c
parenteec87e3266ad8933afae2f2866c983fdc6f5ac18 (diff)
Merged revisions 305473 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r305473 | qwell | 2011-02-01 11:04:23 -0600 (Tue, 01 Feb 2011) | 23 lines Merged revisions 305472 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r305472 | qwell | 2011-02-01 11:02:09 -0600 (Tue, 01 Feb 2011) | 16 lines Merged revisions 305471 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r305471 | qwell | 2011-02-01 11:00:55 -0600 (Tue, 01 Feb 2011) | 9 lines Close file descriptor for timing source when a MOH class gets destroyed. (closes issue #18457) Reported by: mcallist Patches: 18457-closetimer.diff uploaded by qwell (license 4) 18457-closetimer_trunk.diff uploaded by qwell (license 4) Tested by: qwell, loloski ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r--res/res_musiconhold.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 410021547..45280bf74 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -1589,6 +1589,11 @@ static void moh_class_destructor(void *obj)
class->filearray = NULL;
}
+ if (class->timer) {
+ ast_timer_close(class->timer);
+ class->timer = NULL;
+ }
+
/* Finally, collect the exit status of the monitor thread */
if (tid > 0) {
pthread_join(tid, NULL);