[asterisk-commits] bbryant: branch 1.4 r124066 - /branches/1.4/main/utils.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 19 14:55:36 CDT 2008
Author: bbryant
Date: Thu Jun 19 14:55:36 2008
New Revision: 124066
URL: http://svn.digium.com/view/asterisk?view=rev&rev=124066
Log:
Merge revision 124064 from trunk. Add errors that report any locks held by threads when they are being closed.
Modified:
branches/1.4/main/utils.c
Modified: branches/1.4/main/utils.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/utils.c?view=diff&rev=124066&r1=124065&r2=124066
==============================================================================
--- branches/1.4/main/utils.c (original)
+++ branches/1.4/main/utils.c Thu Jun 19 14:55:36 2008
@@ -569,10 +569,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);
free((void *) lock_info->thread_name);
More information about the asterisk-commits
mailing list