diff --git a/xwords4/relay/cidlock.cpp b/xwords4/relay/cidlock.cpp index 2f42ce6c1..bfc10555b 100644 --- a/xwords4/relay/cidlock.cpp +++ b/xwords4/relay/cidlock.cpp @@ -89,10 +89,11 @@ CidLock::print_claimed( const char* caller ) #endif CidInfo* -CidLock::Claim( CookieID cid ) +CidLock::Claim( const CookieID origCid ) { + CookieID cid = origCid; #ifdef CIDLOCK_DEBUG - logf( XW_LOGINFO, "%s(%d)", __func__, cid ); + logf( XW_LOGINFO, "%s(%d)", __func__, origCid ); #endif CidInfo* info = NULL; pthread_t self = pthread_self(); @@ -127,7 +128,7 @@ CidLock::Claim( CookieID cid ) pthread_cond_wait( &m_infos_condvar, &m_infos_mutex ); } #ifdef CIDLOCK_DEBUG - logf( XW_LOGINFO, "%s(%d): DONE", __func__, cid ); + logf( XW_LOGINFO, "%s(%d): DONE", __func__, origCid ); #endif return info; } /* CidLock::Claim */ @@ -191,7 +192,8 @@ CidLock::Relinquish( CidInfo* claim, bool drop ) assert( claim->GetOwner() == pthread_self() ); if ( drop ) { #ifdef CIDLOCK_DEBUG - logf( XW_LOGINFO, "%s: deleting %p", __func__, iter->second ); + logf( XW_LOGINFO, "%s: deleting %p (cid=%d)", + __func__, claim, claim->GetCid() ); #endif m_infos.erase( iter ); claim->SetOwner( 0 ); diff --git a/xwords4/relay/tpool.cpp b/xwords4/relay/tpool.cpp index 7bb5eaf15..8cd246488 100644 --- a/xwords4/relay/tpool.cpp +++ b/xwords4/relay/tpool.cpp @@ -225,7 +225,8 @@ XWThreadPool::IsCurrent( const AddrInfo* addr ) assert( !sockFound ); sockFound = true; result = iter->second.m_addr.created() <= addr->created(); - logf( XW_LOGINFO, "%s(sock=%d)=>%d (%lx vs %lx)", __func__, sock, result, + logf( XW_LOGINFO, "%s(sock=%d)=>%d (%lx vs %lx)", + __func__, sock, result, iter->second.m_addr.created(), addr->created() ); } }