[asterisk-commits] qwell: branch 1.4 r305471 - /branches/1.4/res/res_musiconhold.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 1 11:01:01 CST 2011


Author: qwell
Date: Tue Feb  1 11:00:55 2011
New Revision: 305471

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=305471
Log:
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

Modified:
    branches/1.4/res/res_musiconhold.c

Modified: branches/1.4/res/res_musiconhold.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/res/res_musiconhold.c?view=diff&rev=305471&r1=305470&r2=305471
==============================================================================
--- branches/1.4/res/res_musiconhold.c (original)
+++ branches/1.4/res/res_musiconhold.c Tue Feb  1 11:00:55 2011
@@ -1143,6 +1143,11 @@
 		class->thread = AST_PTHREADT_NULL;
 	}
 
+	if (class->pseudofd > -1) {
+		close(class->pseudofd);
+		class->pseudofd = -1;
+	}
+
 	if (class->filearray) {
 		int i;
 		for (i = 0; i < class->total_files; i++) {




More information about the asterisk-commits mailing list