mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
make comms_getChannelSeed non-static so jni can call it
This commit is contained in:
parent
d893632e1b
commit
22f7a42c1d
2 changed files with 6 additions and 5 deletions
|
@ -896,8 +896,8 @@ makeElemWithID( CommsCtxt* comms, MsgID msgID, AddressRecord* rec,
|
|||
return newMsgElem;
|
||||
} /* makeElemWithID */
|
||||
|
||||
static XP_U16
|
||||
getChannelSeed( CommsCtxt* comms )
|
||||
XP_U16
|
||||
comms_getChannelSeed( CommsCtxt* comms )
|
||||
{
|
||||
while ( comms->channelSeed == 0 ) {
|
||||
comms->channelSeed = XP_RANDOM();
|
||||
|
@ -919,7 +919,7 @@ comms_send( CommsCtxt* comms, XWStreamCtxt* stream )
|
|||
XP_S16 result = -1;
|
||||
|
||||
if ( 0 == channelNo ) {
|
||||
channelNo = getChannelSeed(comms) & ~CHANNEL_MASK;
|
||||
channelNo = comms_getChannelSeed(comms) & ~CHANNEL_MASK;
|
||||
}
|
||||
|
||||
XP_DEBUGF( "%s: assigning msgID=" XP_LD " on chnl %x", __func__,
|
||||
|
@ -1983,7 +1983,7 @@ send_via_relay( CommsCtxt* comms, XWRELAY_Cmd cmd, XWHostID destID,
|
|||
comms->r.nPlayersTotal );
|
||||
stream_putU8( tmpStream, comms->r.nPlayersHere );
|
||||
stream_putU8( tmpStream, comms->r.nPlayersTotal );
|
||||
stream_putU16( tmpStream, getChannelSeed(comms) );
|
||||
stream_putU16( tmpStream, comms_getChannelSeed(comms) );
|
||||
stream_putU8( tmpStream, comms->util->gameInfo->dictLang );
|
||||
set_relay_state( comms, COMMS_RELAYSTATE_CONNECT_PENDING );
|
||||
break;
|
||||
|
@ -2002,7 +2002,7 @@ send_via_relay( CommsCtxt* comms, XWRELAY_Cmd cmd, XWHostID destID,
|
|||
comms->r.nPlayersTotal );
|
||||
stream_putU8( tmpStream, comms->r.nPlayersHere );
|
||||
stream_putU8( tmpStream, comms->r.nPlayersTotal );
|
||||
stream_putU16( tmpStream, getChannelSeed(comms) );
|
||||
stream_putU16( tmpStream, comms_getChannelSeed(comms) );
|
||||
stream_putU8( tmpStream, comms->util->gameInfo->dictLang );
|
||||
stringToStream( tmpStream, comms->r.connName );
|
||||
set_relay_state( comms, COMMS_RELAYSTATE_CONNECT_PENDING );
|
||||
|
|
|
@ -180,6 +180,7 @@ void comms_writeToStream( const CommsCtxt* comms, XWStreamCtxt* stream );
|
|||
|
||||
XP_S16 comms_send( CommsCtxt* comms, XWStreamCtxt* stream );
|
||||
XP_S16 comms_resendAll( CommsCtxt* comms );
|
||||
XP_U16 comms_getChannelSeed( CommsCtxt* comms );
|
||||
|
||||
|
||||
XP_Bool comms_checkIncomingStream( CommsCtxt* comms, XWStreamCtxt* stream,
|
||||
|
|
Loading…
Reference in a new issue