mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
fix failure to send NO_SUCH_GAME over NBS
Wasn't sending zero-length messages, which this one is. Needs testing, because there must have been a reason for that test.
This commit is contained in:
parent
94c57c3b14
commit
79d77410a5
2 changed files with 9 additions and 5 deletions
|
@ -307,6 +307,7 @@ public class NBSProto {
|
|||
if ( XWServiceHelper.ReceiveResult.GAME_GONE == rslt ) {
|
||||
sendDiedPacket( context, addr.sms_phone, gameID );
|
||||
}
|
||||
Log.d( TAG, "feedMessage(): rslt: %s", rslt );
|
||||
return rslt == XWServiceHelper.ReceiveResult.OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ smsproto_prepOutbound( SMSProto* state, XWEnv xwe, SMS_CMD cmd, XP_U32 gameID,
|
|||
|
||||
/* First, add the new message (if present) to the array */
|
||||
XP_U32 nowSeconds = dutil_getCurSeconds( state->dutil, xwe );
|
||||
if ( cmd != NONE && 0 < buflen ) {
|
||||
if ( cmd != NONE ) {
|
||||
addToOutRec( state, rec, cmd, toPort, gameID, buf, buflen, nowSeconds );
|
||||
}
|
||||
|
||||
|
@ -435,10 +435,13 @@ logResult( const SMSProto* state, XWEnv xwe, const SMSMsgArray* result,
|
|||
default:
|
||||
XP_ASSERT(0);
|
||||
}
|
||||
XP_ASSERT( 0 < len );
|
||||
XP_UCHAR* checksum = dutil_md5sum( state->dutil, xwe, data, len );
|
||||
XP_LOGFF( "%s() => datum[%d] sum: %s, len: %d", caller, ii, checksum, len );
|
||||
XP_FREEP( state->mpool, &checksum );
|
||||
if ( 0 == len ) {
|
||||
XP_LOGFF( "%s() => datum[%d] len: 0", caller, ii );
|
||||
} else {
|
||||
XP_UCHAR* checksum = dutil_md5sum( state->dutil, xwe, data, len );
|
||||
XP_LOGFF( "%s() => datum[%d] sum: %s, len: %d", caller, ii, checksum, len );
|
||||
XP_FREEP( state->mpool, &checksum );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue