fix crash using older dict by using current stream version rather than

one from before gameSeconds was being preserved in the stream by
write_gi code.  I fixed this on a branch a week ago as well, so look
for a merge glitch.  Need now to confirm that I'm sending char lists
in initial connect message in the right (null-separated utf8) format.
This commit is contained in:
eehouse 2010-05-28 02:31:13 +00:00
parent 92e02c9c2e
commit f5ac51ae73

View file

@ -1043,14 +1043,8 @@ client_readInitialMessage( ServerCtxt* server, XWStreamCtxt* stream )
XP_U32 gameID;
PoolContext* pool;
/* version */
/* version; any dependencies here? */
XP_U8 streamVersion = stream_getU8( stream );
XP_ASSERT( streamVersion == STREAM_VERS_41B4
|| streamVersion == STREAM_VERS_UTF8);
if ( (streamVersion != STREAM_VERS_41B4)
&& (streamVersion != STREAM_VERS_UTF8) ) {
return XP_FALSE;
}
stream_setVersion( stream, streamVersion );
gameID = stream_getU32( stream );
@ -1189,8 +1183,7 @@ server_sendInitialMessage( ServerCtxt* server )
/* write version for server's benefit; use old version until format
changes */
stream_putU8( stream, dict_isUTF8(dict)?
STREAM_VERS_UTF8:STREAM_VERS_41B4 );
stream_putU8( stream, CUR_STREAM_VERS );
XP_LOGF( "putting gameID %lx into msg", gameID );
stream_putU32( stream, gameID );