mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
cleanup
This commit is contained in:
parent
9752c96add
commit
93a98820e1
2 changed files with 3 additions and 4 deletions
|
@ -552,13 +552,12 @@ public class MQTTUtils extends Thread implements IMqttActionListener, MqttCallba
|
||||||
public static void handleMessage( Context context, CommsAddrRec from,
|
public static void handleMessage( Context context, CommsAddrRec from,
|
||||||
int gameID, byte[] data )
|
int gameID, byte[] data )
|
||||||
{
|
{
|
||||||
Log.d( TAG, "handleMessage(gameID=%d): got message", gameID );
|
|
||||||
MQTTServiceHelper helper = new MQTTServiceHelper( context, from );
|
|
||||||
long[] rowids = DBUtils.getRowIDsFor( context, gameID );
|
long[] rowids = DBUtils.getRowIDsFor( context, gameID );
|
||||||
Log.d( TAG, "got %d rows for gameID %d", rowids.length, gameID );
|
Log.d( TAG, "handleMessage(): got %d rows for gameID %d", rowids.length, gameID );
|
||||||
if ( 0 == rowids.length ) {
|
if ( 0 == rowids.length ) {
|
||||||
notifyNotHere( context, from.mqtt_devID, gameID );
|
notifyNotHere( context, from.mqtt_devID, gameID );
|
||||||
} else {
|
} else {
|
||||||
|
MQTTServiceHelper helper = new MQTTServiceHelper( context, from );
|
||||||
for ( long rowid : rowids ) {
|
for ( long rowid : rowids ) {
|
||||||
MultiMsgSink sink = new MultiMsgSink( context, rowid );
|
MultiMsgSink sink = new MultiMsgSink( context, rowid );
|
||||||
helper.receiveMessage( rowid, sink, data );
|
helper.receiveMessage( rowid, sink, data );
|
||||||
|
|
|
@ -2420,7 +2420,6 @@ comms_checkIncomingStream( CommsCtxt* comms, XWEnv xwe, XWStreamCtxt* stream,
|
||||||
+ sizeof(msgID) + sizeof(lastMsgRcd));
|
+ sizeof(msgID) + sizeof(lastMsgRcd));
|
||||||
if ( messageValid ) {
|
if ( messageValid ) {
|
||||||
XP_U16 payloadSize = 0;
|
XP_U16 payloadSize = 0;
|
||||||
AddressRecord* rec = NULL;
|
|
||||||
|
|
||||||
XP_U16 flags;
|
XP_U16 flags;
|
||||||
(void)getFlags( stream, &connID, &flags );
|
(void)getFlags( stream, &connID, &flags );
|
||||||
|
@ -2459,6 +2458,7 @@ comms_checkIncomingStream( CommsCtxt* comms, XWEnv xwe, XWStreamCtxt* stream,
|
||||||
XP_LOGF( TAGFMT() "got message to self?", TAGPRMS );
|
XP_LOGF( TAGFMT() "got message to self?", TAGPRMS );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AddressRecord* rec = NULL;
|
||||||
if ( messageValid ) {
|
if ( messageValid ) {
|
||||||
if ( connID == CONN_ID_NONE ) {
|
if ( connID == CONN_ID_NONE ) {
|
||||||
/* special case: initial message from client or server */
|
/* special case: initial message from client or server */
|
||||||
|
|
Loading…
Reference in a new issue