From dc957e1a920446dac30d1277f9cab7466b8a66f5 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Fri, 10 Sep 2010 13:45:40 -0700 Subject: [PATCH] add match test on language code and number of players --- xwords4/relay/crefmgr.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xwords4/relay/crefmgr.cpp b/xwords4/relay/crefmgr.cpp index e7da58135..b24447e62 100644 --- a/xwords4/relay/crefmgr.cpp +++ b/xwords4/relay/crefmgr.cpp @@ -145,6 +145,13 @@ CRefMgr::FindOpenGameFor( const char* cookie, const char* connName, ++iter ) { CookieRef* cref = iter->second; + /* Reject immediately if language code or proposed game size don't + match. */ + if ( (cref->GetLangCode() != langCode) + || (cref->GetPlayersSought() != nPlayersT) ) { + continue; + } + if ( !!connName && 0 == strcmp( cref->ConnName(), connName ) ) { found = cref; /* if ( cref->Lock() ) { */