mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
cleanup
This commit is contained in:
parent
3510268752
commit
8c3c1b59f6
2 changed files with 13 additions and 5 deletions
|
@ -1045,8 +1045,9 @@ comms_augmentHostAddr( CommsCtxt* comms, XWEnv xwe, const CommsAddrRec* addr )
|
||||||
}
|
}
|
||||||
} /* comms_setHostAddr */
|
} /* comms_setHostAddr */
|
||||||
|
|
||||||
void comms_addMQTTDevID( CommsCtxt* comms, XP_PlayerAddr channelNo,
|
void
|
||||||
const MQTTDevID* devID )
|
comms_addMQTTDevID( CommsCtxt* comms, XP_PlayerAddr channelNo,
|
||||||
|
const MQTTDevID* devID )
|
||||||
{
|
{
|
||||||
XP_LOGFF( "(devID: " MQTTDevID_FMT ")", *devID );
|
XP_LOGFF( "(devID: " MQTTDevID_FMT ")", *devID );
|
||||||
XP_Bool found = XP_FALSE;
|
XP_Bool found = XP_FALSE;
|
||||||
|
@ -2989,7 +2990,14 @@ augmentAddr( CommsAddrRec* destAddr, const CommsAddrRec* srcAddr )
|
||||||
}
|
}
|
||||||
if ( !!dest ) {
|
if ( !!dest ) {
|
||||||
if ( 0 != XP_MEMCMP( dest, src, siz ) ) {
|
if ( 0 != XP_MEMCMP( dest, src, siz ) ) {
|
||||||
XP_LOGFF( "actually changing addr info for typ %s", ConnType2Str(typ) );
|
#ifdef DEBUG
|
||||||
|
CommsAddrRec dummy = {0};
|
||||||
|
if ( 0 == XP_MEMCMP( &dummy, dest, siz ) ) {
|
||||||
|
XP_LOGFF( "setting %s-type addr for first time", ConnType2Str(typ) );
|
||||||
|
} else if ( 0 != XP_MEMCMP( dest, src, siz ) ) {
|
||||||
|
XP_LOGFF( "actually changing addr info for typ %s", ConnType2Str(typ) );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
XP_MEMCPY( dest, src, siz );
|
XP_MEMCPY( dest, src, siz );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,11 +97,11 @@ dvc_getMQTTDevID( XW_DUtilCtxt* dutil, XWEnv xwe, MQTTDevID* devID )
|
||||||
XP_UCHAR buf[32];
|
XP_UCHAR buf[32];
|
||||||
formatMQTTDevID( &tmp, buf, VSIZE(buf) );
|
formatMQTTDevID( &tmp, buf, VSIZE(buf) );
|
||||||
/* This log statement is required by discon_ok2.py!!! (keep in sync) */
|
/* This log statement is required by discon_ok2.py!!! (keep in sync) */
|
||||||
XP_LOGFF( "generated id: %s", buf );
|
XP_LOGFF( "generated id: %s; key: %s", buf, MQTT_DEVID_KEY );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
*devID = tmp;
|
*devID = tmp;
|
||||||
// LOG_RETURNF( MQTTDevID_FMT, *devID );
|
// LOG_RETURNF( MQTTDevID_FMT " key: %s", *devID, MQTT_DEVID_KEY );
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef enum { CMD_INVITE, CMD_MSG, CMD_DEVGONE, } MQTTCmd;
|
typedef enum { CMD_INVITE, CMD_MSG, CMD_DEVGONE, } MQTTCmd;
|
||||||
|
|
Loading…
Add table
Reference in a new issue