mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
optimization: test address before fetching messages for it
This commit is contained in:
parent
9951064439
commit
5f9b2e431f
1 changed files with 17 additions and 15 deletions
|
@ -859,6 +859,7 @@ CookieRef::send_stored_messages( HostID dest, const AddrInfo* addr )
|
|||
logf( XW_LOGVERBOSE0, "%s(dest=%d)", __func__, dest );
|
||||
assert( dest > 0 && dest <= 4 );
|
||||
|
||||
if ( addr->isCurrent() ) {
|
||||
DBMgr* dbmgr = DBMgr::Get();
|
||||
const char* cname = ConnName();
|
||||
vector<DBMgr::MsgInfo> msgs;
|
||||
|
@ -877,6 +878,7 @@ CookieRef::send_stored_messages( HostID dest, const AddrInfo* addr )
|
|||
sentIDs.push_back( msg.msgID );
|
||||
}
|
||||
dbmgr->RemoveStoredMessages( sentIDs );
|
||||
}
|
||||
} /* send_stored_messages */
|
||||
|
||||
bool
|
||||
|
|
Loading…
Add table
Reference in a new issue