pass langCode in reconnect case too

This commit is contained in:
Andy2 2010-09-11 01:23:39 -07:00
parent bd71a15ddc
commit 463e9c3ccf
3 changed files with 6 additions and 4 deletions

View file

@ -681,7 +681,7 @@ SafeCref::SafeCref( const char* cookie, int socket, int nPlayersH, int nPlayersS
/* REconnect case */
SafeCref::SafeCref( const char* connName, HostID hid,
int socket, int nPlayersH, int nPlayersS,
unsigned short gameSeed )
unsigned short gameSeed, int langCode )
: m_cref( NULL )
, m_mgr( CRefMgr::Get() )
, m_isValid( false )
@ -689,7 +689,7 @@ SafeCref::SafeCref( const char* connName, HostID hid,
CookieRef* cref;
cref = m_mgr->getMakeCookieRef_locked( NULL, connName, hid, socket, nPlayersH,
nPlayersS, -1, gameSeed );
nPlayersS, langCode, gameSeed );
if ( cref != NULL ) {
m_locked = cref->Lock();
m_cref = cref;

View file

@ -185,7 +185,7 @@ class SafeCref {
/* for reconnect */
SafeCref( const char* connName, HostID hid,
int socket, int nPlayersH, int nPlayersS,
unsigned short gameSeed );
unsigned short gameSeed, int langCode );
SafeCref( CookieID cid, bool failOk = false );
SafeCref( int socket );
SafeCref( CookieRef* cref );

View file

@ -164,7 +164,9 @@ cmdToStr( XWRELAY_Cmd cmd )
CASESTR(XWRELAY_DISCONNECT_YOU);
CASESTR(XWRELAY_DISCONNECT_OTHER);
CASESTR(XWRELAY_CONNECTDENIED);
#ifdef RELAY_HEARTBEAT
CASESTR(XWRELAY_HEARTBEAT);
#endif
CASESTR(XWRELAY_MSG_FROMRELAY);
CASESTR(XWRELAY_MSG_TORELAY);
default:
@ -379,7 +381,7 @@ processReconnect( unsigned char* bufp, int bufLen, int socket )
SafeCref scr( connName[0]? connName : NULL,
srcID, socket, nPlayersH,
nPlayersT, gameSeed );
nPlayersT, gameSeed, langCode );
success = scr.Reconnect( socket, srcID, nPlayersH, nPlayersT,
gameSeed );
}