[asterisk-commits] russell: branch 1.6.1 r164884 - in /branches/1.6.1: ./ main/utils.c

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


Author: russell
Date: Tue Dec 16 15:40:30 2008
New Revision: 164884

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

................
r164882 | russell | 2008-12-16 15:39:15 -0600 (Tue, 16 Dec 2008) | 17 lines

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:
    branches/1.6.1/   (props changed)
    branches/1.6.1/main/utils.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/main/utils.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/utils.c?view=diff&rev=164884&r1=164883&r2=164884
==============================================================================
--- branches/1.6.1/main/utils.c (original)
+++ branches/1.6.1/main/utils.c Tue Dec 16 15:40:30 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