mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
clean up logging
This commit is contained in:
parent
c84722fc22
commit
e122953fd5
2 changed files with 2 additions and 3 deletions
|
@ -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 ) {
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue