mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
fix leak; remove unused variable
This commit is contained in:
parent
8b936ea0ea
commit
6e14a6d33a
1 changed files with 1 additions and 3 deletions
|
@ -75,6 +75,7 @@ XWThreadPool::~XWThreadPool()
|
||||||
|
|
||||||
pthread_rwlock_destroy( &m_activeSocketsRWLock );
|
pthread_rwlock_destroy( &m_activeSocketsRWLock );
|
||||||
pthread_mutex_destroy ( &m_queueMutex );
|
pthread_mutex_destroy ( &m_queueMutex );
|
||||||
|
free( m_threadInfos );
|
||||||
} /* ~XWThreadPool */
|
} /* ~XWThreadPool */
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -212,14 +213,11 @@ bool
|
||||||
XWThreadPool::IsCurrent( const AddrInfo* addr )
|
XWThreadPool::IsCurrent( const AddrInfo* addr )
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
bool sockFound = false; // for debugging
|
|
||||||
int sock = addr->socket();
|
int sock = addr->socket();
|
||||||
if ( -1 != sock ) {
|
if ( -1 != sock ) {
|
||||||
RWReadLock ml( &m_activeSocketsRWLock );
|
RWReadLock ml( &m_activeSocketsRWLock );
|
||||||
map<int, SockInfo>::const_iterator iter = m_activeSockets.find( sock );
|
map<int, SockInfo>::const_iterator iter = m_activeSockets.find( sock );
|
||||||
if ( iter != m_activeSockets.end() ) {
|
if ( iter != m_activeSockets.end() ) {
|
||||||
assert( !sockFound );
|
|
||||||
sockFound = true;
|
|
||||||
result = iter->second.m_addr.created() <= addr->created();
|
result = iter->second.m_addr.created() <= addr->created();
|
||||||
logf( XW_LOGINFO, "%s(sock=%d)=>%d (%lx vs %lx)",
|
logf( XW_LOGINFO, "%s(sock=%d)=>%d (%lx vs %lx)",
|
||||||
__func__, sock, result,
|
__func__, sock, result,
|
||||||
|
|
Loading…
Reference in a new issue