From 669acdcd1989368d85f74832edaa766fc16e1f62 Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 13 Jul 2018 07:39:11 -0700 Subject: [PATCH] log checksum of messages into smsproto --- xwords4/common/smsproto.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xwords4/common/smsproto.c b/xwords4/common/smsproto.c index a27a21983..f60240534 100644 --- a/xwords4/common/smsproto.c +++ b/xwords4/common/smsproto.c @@ -164,7 +164,14 @@ smsproto_prepOutbound( SMSProto* state, const XP_U8* buf, XP_Bool forceOld, XP_U16* waitSecsP ) { SMSMsgArray* result = NULL; - XP_LOGF( "%s(): len=%d, toPhone=%s", __func__, buflen, toPhone ); + +#ifdef DEBUG + XP_UCHAR* checksum = dutil_md5sum( state->dutil, buf, buflen ); + XP_LOGF( "%s(): len=%d, sum=%s, toPhone=%s", __func__, buflen, + checksum, toPhone ); + XP_FREEP( state->mpool, &checksum ); +#endif + checkThread( state ); ToPhoneRec* rec = getForPhone( state, toPhone, !!buf ); @@ -606,7 +613,6 @@ completeMsgs( SMSProto* state, SMSMsgArray* arr, const XP_UCHAR* fromPhone, static SMSMsgArray* toMsgs( SMSProto* state, ToPhoneRec* rec, XP_Bool forceOld ) { - LOG_FUNC(); SMSMsgArray* result = NULL; for ( XP_U16 ii = 0; ii < rec->nMsgs; ) {