[asterisk-commits] russell: trunk r164882 - in /trunk: ./ main/utils.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 16 15:39:16 CST 2008


Author: russell
Date: Tue Dec 16 15:39:15 2008
New Revision: 164882

URL: http://svn.digium.com/view/asterisk?view=rev&rev=164882
Log:
Merged revisions 164881 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164881 | russell | 2008-12-16 15:38:29 -0600 (Tue, 16 Dec 2008) | 9 lines

Fix an issue where DEBUG_THREADS may erroneously report that a thread 
is exiting while holding a lock.

If the last lock attempt was a trylock, and it failed, it will still be in the
list of locks so that it can be reported.

(closes issue #13219)
Reported by: pj

........

Modified:
    trunk/   (props changed)
    trunk/main/utils.c

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

Modified: trunk/main/utils.c
URL: http://svn.digium.com/view/asterisk/trunk/main/utils.c?view=diff&rev=164882&r1=164881&r2=164882
==============================================================================
--- trunk/main/utils.c (original)
+++ trunk/main/utils.c Tue Dec 16 15:39:15 2008
@@ -520,6 +520,12 @@
 
 
 	for (i = 0; i < lock_info->num_locks; i++) {
+		if (lock_info->locks[i].pending == -1) {
+			/* This just means that the last lock this thread went for was by
+			 * using trylock, and it failed.  This is fine. */
+			break;
+		}
+
 		ast_log(LOG_ERROR, 
 			"Thread '%s' still has a lock! - '%s' (%p) from '%s' in %s:%d!\n", 
 			lock_info->thread_name,




More information about the asterisk-commits mailing list