mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
make easier to comment out
This commit is contained in:
parent
a8db820b68
commit
fef4db0ee4
1 changed files with 9 additions and 4 deletions
|
@ -90,18 +90,23 @@ UDPAger::Refresh( const AddrInfo* addr )
|
||||||
bool
|
bool
|
||||||
UDPAger::IsCurrent( const AddrInfo* addr )
|
UDPAger::IsCurrent( const AddrInfo* addr )
|
||||||
{
|
{
|
||||||
|
bool result;
|
||||||
|
#if 0
|
||||||
|
result = false;
|
||||||
|
#else
|
||||||
const AddrInfo::AddrUnion* saddr = addr->saddr();
|
const AddrInfo::AddrUnion* saddr = addr->saddr();
|
||||||
uint32_t readWhen = addr->created();
|
uint32_t readWhen = addr->created();
|
||||||
|
|
||||||
MutexLock ml( &m_addrTimeMapLock );
|
MutexLock ml( &m_addrTimeMapLock );
|
||||||
map<AddrInfo::AddrUnion, AgePair*>::const_iterator iter =
|
map<AddrInfo::AddrUnion, AgePair*>::const_iterator iter =
|
||||||
m_addrTimeMap.find( *saddr );
|
m_addrTimeMap.find( *saddr );
|
||||||
assert( m_addrTimeMap.end() != iter );
|
assert( m_addrTimeMap.end() != iter );
|
||||||
|
|
||||||
AgePair* ap = iter->second;
|
AgePair* ap = iter->second;
|
||||||
bool result = readWhen >= ap->created();
|
result = readWhen >= ap->created();
|
||||||
|
#endif
|
||||||
if ( !result ) {
|
if ( !result ) {
|
||||||
logf( XW_LOGINFO, "%s() => %d", __func__, result );
|
logf( XW_LOGINFO, "%s() => false", __func__ );
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue