diff options
-rw-r--r-- | include/asterisk/lock.h | 4 | ||||
-rw-r--r-- | main/utils.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index 471c938f2..be2bf3bea 100644 --- a/include/asterisk/lock.h +++ b/include/asterisk/lock.h @@ -1027,7 +1027,7 @@ static inline int _ast_rwlock_timedrdlock(ast_rwlock_t *lock, const char *name, do { struct timeval _start = ast_tvnow(), _diff; for (;;) { - if (!(res = pthread_rwlock_tryrdlock(&t->lock))) { + if (!(res = pthread_rwlock_tryrdlock(lock))) { break; } _diff = ast_tvsub(ast_tvnow(), _start); @@ -1076,7 +1076,7 @@ static inline int _ast_rwlock_timedwrlock(ast_rwlock_t *lock, const char *name, do { struct timeval _start = ast_tvnow(), _diff; for (;;) { - if (!(res = pthread_rwlock_trywrlock(&t->lock))) { + if (!(res = pthread_rwlock_trywrlock(lock))) { break; } _diff = ast_tvsub(ast_tvnow(), _start); diff --git a/main/utils.c b/main/utils.c index 8c601b3d7..ff8b36928 100644 --- a/main/utils.c +++ b/main/utils.c @@ -726,7 +726,7 @@ static int handle_show_locks(int fd, int argc, char *argv[]) AST_LIST_TRAVERSE(&lock_infos, lock_info, entry) { int i; if (lock_info->num_locks) { - ast_dynamic_str_append(&str, 0, "=== Thread ID: %u (%s)\n", (int) lock_info->thread_id, + ast_dynamic_str_append(&str, 0, "=== Thread ID: %ld (%s)\n", (long) lock_info->thread_id, lock_info->thread_name); pthread_mutex_lock(&lock_info->lock); for (i = 0; str && i < lock_info->num_locks; i++) { |