From e122953fd5e250c135c919778bb394791ee81dc5 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Mon, 27 Jun 2011 18:27:07 -0700 Subject: [PATCH] clean up logging --- xwords4/linux/cursesmain.c | 1 - xwords4/linux/linuxmain.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/xwords4/linux/cursesmain.c b/xwords4/linux/cursesmain.c index e43c98210..03cb09f62 100644 --- a/xwords4/linux/cursesmain.c +++ b/xwords4/linux/cursesmain.c @@ -1085,7 +1085,6 @@ blocking_gotEvent( CursesAppGlobals* globals, int* ch ) XWStreamCtxt* inboundS; redraw = XP_FALSE; - XP_STATUSF( "linuxReceive=>%d", nBytes ); inboundS = stream_from_msgbuf( &globals->cGlobals, buf, nBytes ); if ( !!inboundS ) { diff --git a/xwords4/linux/linuxmain.c b/xwords4/linux/linuxmain.c index 8b133d6db..b18a12e4b 100644 --- a/xwords4/linux/linuxmain.c +++ b/xwords4/linux/linuxmain.c @@ -672,14 +672,13 @@ linux_relay_receive( CommonGlobals* cGlobals, unsigned char* buf, int bufSize ) { int sock = cGlobals->socket; unsigned short tmp; - unsigned short packetSize; ssize_t nRead = blocking_read( sock, (unsigned char*)&tmp, sizeof(tmp) ); if ( nRead != 2 ) { linux_close_socket( cGlobals ); comms_transportFailed( cGlobals->game.comms ); nRead = -1; } else { - packetSize = ntohs( tmp ); + unsigned short packetSize = ntohs( tmp ); assert( packetSize <= bufSize ); nRead = blocking_read( sock, buf, packetSize ); if ( nRead == packetSize ) { @@ -703,6 +702,7 @@ linux_relay_receive( CommonGlobals* cGlobals, unsigned char* buf, int bufSize ) } } } + XP_LOGF( "%s=>%d", __func__, nRead ); return nRead; } /* linux_relay_receive */ #endif /* XWFEATURE_RELAY */