aboutsummaryrefslogtreecommitdiffstats
path: root/main/utils.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-16 21:39:45 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-16 21:39:45 +0000
commit3e8b8753f772ffc0c680f993ac2fc13a3d032ead (patch)
tree28509a1a83ccf3215aebd3d3453bd5a6e60d38f6 /main/utils.c
parent4aeddfd80047fff8e09e250f6ffb4a093df129f0 (diff)
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 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@164883 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/utils.c')
-rw-r--r--main/utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/utils.c b/main/utils.c
index f599f2473..a851b2cec 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -514,6 +514,12 @@ static void lock_info_destroy(void *data)
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,