[asterisk-commits] file: trunk r431808 - in /trunk: ./ res/res_timing_pthread.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Feb 15 06:41:08 CST 2015


Author: file
Date: Sun Feb 15 06:41:06 2015
New Revision: 431808

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431808
Log:
res_timing_pthread: Fix leaky pipes.

During some refactoring the way private information for timers
was stored was changed. As a result of this the action which normally
removed the timer upon closure in res_timing_pthread was also removed
causing the timer to remain after it should using up resources.
This change ensures that the timer is removed upon closure.

ASTERISK-24768 #close
Reported by: Matthias Urlichs
patches:
 timer.patch submitted by Matthias Urlichs (license 5508)
........

Merged revisions 431807 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    trunk/   (props changed)
    trunk/res/res_timing_pthread.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/res/res_timing_pthread.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_timing_pthread.c?view=diff&rev=431808&r1=431807&r2=431808
==============================================================================
--- trunk/res/res_timing_pthread.c (original)
+++ trunk/res/res_timing_pthread.c Sun Feb 15 06:41:06 2015
@@ -143,7 +143,7 @@
 		ast_cond_signal(&timing_thread.cond);
 		ast_mutex_unlock(&timing_thread.lock);
 	}
-	ao2_link(pthread_timers, timer);
+	ao2_link_flags(pthread_timers, timer, OBJ_NOLOCK);
 	ao2_unlock(pthread_timers);
 
 	return timer;
@@ -153,6 +153,7 @@
 {
 	struct pthread_timer *timer = data;
 
+	ao2_unlink(pthread_timers, timer);
 	ao2_ref(timer, -1);
 }
 




More information about the asterisk-commits mailing list