fix so invitation results in a playable game (though dictionary is not

yet available to invitation recipient)
This commit is contained in:
Eric House 2013-12-17 21:57:10 -08:00
parent 2a47c91a91
commit f45f3bacbf
3 changed files with 8 additions and 5 deletions

View file

@ -536,9 +536,11 @@ createOrLoadObjects( GtkGameGlobals* globals )
#endif
#ifdef XWFEATURE_SMS
case COMMS_CONN_SMS:
XP_STRNCPY( addr.u.sms.phone, params->connInfo.sms.phone,
sizeof(addr.u.sms.phone) - 1 );
addr.u.sms.port = params->connInfo.sms.port;
/* No! Don't overwrite what may be a return address with local
stuff */
/* XP_STRNCPY( addr.u.sms.phone, params->connInfo.sms.phone, */
/* sizeof(addr.u.sms.phone) - 1 ); */
/* addr.u.sms.port = params->connInfo.sms.port; */
break;
#endif
default:

View file

@ -542,8 +542,8 @@ smsInviteReceived( void* closure, const XP_UCHAR* gameName, XP_U32 gameID,
CurGameInfo gi = {0};
gi_copy( MPPARM(params->mpool) &gi, &params->pgi );
gi_setNPlayers( &gi, nPlayers, nHere );
gi.gameID = gameID;
gi.nPlayers = nPlayers;
gi.dictLang = dictLang;
replaceStringIfDifferent( params->mpool, &gi.dictName, dictName );

View file

@ -225,8 +225,9 @@ dispatch_data( LinSMS2Data* storage, XP_U16 XP_UNUSED(proto),
{
XP_USE( addr );
XP_U32 gameID = stream_getU32( stream );
const XP_U8* data = stream_getPtr( stream );
XP_U16 len = stream_getSize( stream );
XP_U8 data[len];
stream_getBytes( stream, data, len );
(*storage->procs->msgReceived)( storage->procClosure, gameID,
data, len, addr );