mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
force 16-letter devids
This commit is contained in:
parent
27e784e784
commit
43ce9f390a
2 changed files with 4 additions and 2 deletions
|
@ -249,9 +249,9 @@ typedef struct _PlayerDicts {
|
|||
typedef uint64_t MQTTDevID;
|
||||
|
||||
#if __WORDSIZE == 64
|
||||
# define MQTTDevID_FMT "%lX"
|
||||
# define MQTTDevID_FMT "%016lX"
|
||||
#elif __WORDSIZE == 32
|
||||
# define MQTTDevID_FMT "%llX"
|
||||
# define MQTTDevID_FMT "%016llX"
|
||||
#endif
|
||||
# define MQTTTopic_FMT "xw4/device/" MQTTDevID_FMT
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ loadClientID( LaunchParams* params, MQTTConStorage* storage )
|
|||
dvc_getMQTTDevID( params->dutil, NULL_XWE, &storage->clientID );
|
||||
formatMQTTDevID( &storage->clientID, storage->clientIDStr,
|
||||
VSIZE(storage->clientIDStr) );
|
||||
XP_ASSERT( 16 == strlen(storage->clientIDStr) );
|
||||
formatMQTTTopic( &storage->clientID, storage->topic, VSIZE(storage->topic) );
|
||||
}
|
||||
|
||||
|
@ -238,6 +239,7 @@ mqttc_invite( LaunchParams* params, NetLaunchInfo* nli, const MQTTDevID* invitee
|
|||
MQTTConStorage* storage = getStorage( params );
|
||||
gchar buf[32];
|
||||
XP_LOGFF( "need to send to %s", formatMQTTDevID(invitee, buf, sizeof(buf) ) );
|
||||
XP_ASSERT( 16 == strlen(buf) );
|
||||
|
||||
XWStreamCtxt* stream = mem_stream_make_raw( MPPARM(params->mpool)
|
||||
params->vtMgr );
|
||||
|
|
Loading…
Reference in a new issue