mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-29 10:26:36 +01:00
turn off glib-dependant checksuming for non-linux builds
This commit is contained in:
parent
6e56fb3544
commit
b9e3ca212b
2 changed files with 15 additions and 7 deletions
|
@ -54,7 +54,7 @@ typedef struct MsgQueueElem {
|
|||
XP_PlayerAddr channelNo;
|
||||
XP_U16 sendCount; /* how many times sent? */
|
||||
MsgID msgID; /* saved for ease of deletion */
|
||||
#ifdef DEBUG
|
||||
#ifdef COMMS_CHECKSUM
|
||||
gchar* checksum;
|
||||
#endif
|
||||
} MsgQueueElem;
|
||||
|
@ -553,7 +553,7 @@ comms_makeFromStream( MPFORMAL XWStreamCtxt* stream, XW_UtilCtxt* util,
|
|||
msg->len = stream_getU16( stream );
|
||||
msg->msg = (XP_U8*)XP_MALLOC( mpool, msg->len );
|
||||
stream_getBytes( stream, msg->msg, msg->len );
|
||||
#ifdef DEBUG
|
||||
#ifdef COMMS_CHECKSUM
|
||||
msg->checksum = g_compute_checksum_for_data( G_CHECKSUM_MD5,
|
||||
msg->msg, msg->len );
|
||||
#endif
|
||||
|
@ -886,7 +886,7 @@ makeElemWithID( CommsCtxt* comms, MsgID msgID, AddressRecord* rec,
|
|||
stream_getBytes( stream, newMsgElem->msg + headerLen, streamSize );
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef COMMS_CHECKSUM
|
||||
newMsgElem->checksum = g_compute_checksum_for_data( G_CHECKSUM_MD5,
|
||||
newMsgElem->msg,
|
||||
newMsgElem->len );
|
||||
|
@ -962,8 +962,15 @@ printQueue( const CommsCtxt* comms )
|
|||
|
||||
for ( elem = comms->msgQueueHead, i = 0; i < comms->queueLen;
|
||||
elem = elem->next, ++i ) {
|
||||
XP_STATUSF( "\t%d: channel: %x; msgID=" XP_LD "; check=%s",
|
||||
i+1, elem->channelNo, elem->msgID, elem->checksum );
|
||||
XP_STATUSF( "\t%d: channel: %x; msgID=" XP_LD
|
||||
#ifdef COMMS_CHECKSUM
|
||||
"; check=%s"
|
||||
#endif
|
||||
,i+1, elem->channelNo, elem->msgID
|
||||
#ifdef COMMS_CHECKSUM
|
||||
, elem->checksum
|
||||
#endif
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -989,7 +996,7 @@ static void
|
|||
freeElem( const CommsCtxt* XP_UNUSED_DBG(comms), MsgQueueElem* elem )
|
||||
{
|
||||
XP_FREE( comms->mpool, elem->msg );
|
||||
#ifdef DEBUG
|
||||
#ifdef COMMS_CHECKSUM
|
||||
g_free( elem->checksum );
|
||||
#endif
|
||||
XP_FREE( comms->mpool, elem );
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
ifeq ($(MEMDEBUG),TRUE)
|
||||
DEFINES = -DMEM_DEBUG -DDEBUG -DENABLE_LOGGING -DNUMBER_KEY_AS_INDEX
|
||||
DEFINES = -DMEM_DEBUG -DDEBUG -DENABLE_LOGGING -DNUMBER_KEY_AS_INDEX
|
||||
DEFINES += -DCOMMS_CHECKSUM
|
||||
CFLAGS += -g $(GPROFFLAG) -Wall -Wunused-parameter -Wcast-align -Werror -O0
|
||||
CFLAGS += -DDEBUG_TS
|
||||
PLATFORM = obj_linux_memdbg
|
||||
|
|
Loading…
Reference in a new issue