mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
fix crash when old client connects to new host by making host use the
right version test in deciding what to send.
This commit is contained in:
parent
4ea8569abc
commit
e7d5be06e9
1 changed files with 6 additions and 3 deletions
|
@ -1384,6 +1384,9 @@ server_sendInitialMessage( ServerCtxt* server )
|
|||
XP_U16 nPlayers = server->vol.gi->nPlayers;
|
||||
CurGameInfo localGI;
|
||||
XP_U32 gameID = server->vol.gi->gameID;
|
||||
#ifdef STREAM_VERS_BIGBOARD
|
||||
XP_U8 streamVersion = server->nv.streamVersion;
|
||||
#endif
|
||||
|
||||
XP_ASSERT( server->nv.nDevices > 1 );
|
||||
for ( deviceIndex = 1; deviceIndex < server->nv.nDevices;
|
||||
|
@ -1397,8 +1400,8 @@ server_sendInitialMessage( ServerCtxt* server )
|
|||
writeProto( server, stream, XWPROTO_CLIENT_SETUP );
|
||||
|
||||
#ifdef STREAM_VERS_BIGBOARD
|
||||
XP_ASSERT( 0 < server->nv.streamVersion );
|
||||
stream_putU8( stream, server->nv.streamVersion );
|
||||
XP_ASSERT( 0 < streamVersion );
|
||||
stream_putU8( stream, streamVersion );
|
||||
#else
|
||||
stream_putU8( stream, CUR_STREAM_VERS );
|
||||
#endif
|
||||
|
@ -1411,7 +1414,7 @@ server_sendInitialMessage( ServerCtxt* server )
|
|||
|
||||
dict_writeToStream( dict, stream );
|
||||
#ifdef STREAM_VERS_BIGBOARD
|
||||
if ( STREAM_VERS_DICTNAME <= addr->streamVersion ) {
|
||||
if ( STREAM_VERS_DICTNAME <= streamVersion ) {
|
||||
stringToStream( stream, dict_getShortName(dict) );
|
||||
stringToStream( stream, dict_getMd5Sum(dict) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue