[asterisk-commits] bbryant: branch 1.6.0 r124065 - in /branches/1.6.0: ./ main/utils.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 19 14:49:54 CDT 2008
Author: bbryant
Date: Thu Jun 19 14:49:54 2008
New Revision: 124065
URL: http://svn.digium.com/view/asterisk?view=rev&rev=124065
Log:
Merged revisions 124064 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r124064 | bbryant | 2008-06-19 14:48:26 -0500 (Thu, 19 Jun 2008) | 2 lines
Add errors that report any locks held by threads when they are being closed.
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/main/utils.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/main/utils.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/utils.c?view=diff&rev=124065&r1=124064&r2=124065
==============================================================================
--- branches/1.6.0/main/utils.c (original)
+++ branches/1.6.0/main/utils.c Thu Jun 19 14:49:54 2008
@@ -568,10 +568,24 @@
static void lock_info_destroy(void *data)
{
struct thr_lock_info *lock_info = data;
+ int i;
pthread_mutex_lock(&lock_infos_lock.mutex);
AST_LIST_REMOVE(&lock_infos, lock_info, entry);
pthread_mutex_unlock(&lock_infos_lock.mutex);
+
+
+ for (i = 0; i < lock_info->num_locks; i++) {
+ ast_log(LOG_ERROR,
+ "Thread '%s' still has a lock! - '%s' (%p) from '%s' in %s:%d!\n",
+ lock_info->thread_name,
+ lock_info->locks[i].lock_name,
+ lock_info->locks[i].lock_addr,
+ lock_info->locks[i].func,
+ lock_info->locks[i].file,
+ lock_info->locks[i].line_num
+ );
+ }
pthread_mutex_destroy(&lock_info->lock);
if (lock_info->thread_name)
More information about the asterisk-commits
mailing list