mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-24 07:58:34 +01:00
remove dead code
This commit is contained in:
parent
1d41eea48d
commit
a5f8b87478
1 changed files with 6 additions and 13 deletions
|
@ -106,7 +106,7 @@ dvc_getMQTTDevID( XW_DUtilCtxt* dutil, XWEnv xwe, MQTTDevID* devID )
|
||||||
|
|
||||||
typedef enum { CMD_INVITE, CMD_MSG, CMD_DEVGONE, } MQTTCmd;
|
typedef enum { CMD_INVITE, CMD_MSG, CMD_DEVGONE, } MQTTCmd;
|
||||||
|
|
||||||
#define PROTO_0 0
|
// #define PROTO_0 0
|
||||||
#define PROTO_1 1 /* moves gameID into "header" relay2 knows about */
|
#define PROTO_1 1 /* moves gameID into "header" relay2 knows about */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -158,9 +158,9 @@ dvc_parseMQTTPacket( XW_DUtilCtxt* dutil, XWEnv xwe, const XP_U8* buf, XP_U16 le
|
||||||
stream_putBytes( stream, buf, len );
|
stream_putBytes( stream, buf, len );
|
||||||
|
|
||||||
XP_U8 proto = stream_getU8( stream );
|
XP_U8 proto = stream_getU8( stream );
|
||||||
if ( proto != PROTO_0 && proto != PROTO_1 ) {
|
if ( proto != PROTO_1 ) {
|
||||||
XP_LOGFF( "read proto %d, expected %d or %d; dropping packet",
|
XP_LOGFF( "read proto %d, expected %d; dropping packet",
|
||||||
proto, PROTO_0, PROTO_1 );
|
proto, PROTO_1 );
|
||||||
} else {
|
} else {
|
||||||
MQTTDevID myID;
|
MQTTDevID myID;
|
||||||
stream_getBytes( stream, &myID, sizeof(myID) );
|
stream_getBytes( stream, &myID, sizeof(myID) );
|
||||||
|
@ -169,15 +169,8 @@ dvc_parseMQTTPacket( XW_DUtilCtxt* dutil, XWEnv xwe, const XP_U8* buf, XP_U16 le
|
||||||
MQTTCmd cmd;
|
MQTTCmd cmd;
|
||||||
XP_U32 gameID = 0;
|
XP_U32 gameID = 0;
|
||||||
|
|
||||||
if ( PROTO_0 == proto ) {
|
gameID = stream_getU32( stream );
|
||||||
cmd = stream_getU8( stream );
|
cmd = stream_getU8( stream );
|
||||||
if ( CMD_INVITE != cmd ) {
|
|
||||||
gameID = stream_getU32( stream );
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
gameID = stream_getU32( stream );
|
|
||||||
cmd = stream_getU8( stream );
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ( cmd ) {
|
switch ( cmd ) {
|
||||||
case CMD_INVITE: {
|
case CMD_INVITE: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue