From d39cb59c03b4509d2529bedcb3df8418d5f1c3bc Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sun, 27 Jan 2008 11:51:59 +0000 Subject: [PATCH] small change --- src/socket.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/socket.cpp b/src/socket.cpp index 3530ec6e..0e7d23a1 100755 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -87,19 +87,19 @@ void CSocket::OnDataReceived() quint16 SenderPort; // read block from network interface and query address of sender - const int iNumBytesRead = SocketDevice.readDatagram ( (char*) &vecbyRecBuf[0], + int iNumBytesRead = SocketDevice.readDatagram ( (char*) &vecbyRecBuf[0], MAX_SIZE_BYTES_NETW_BUF, &SenderAddress, &SenderPort ); - // convert address of client - CHostAddress RecHostAddr ( SenderAddress, SenderPort ); - // check if an error occurred if ( iNumBytesRead < 0 ) { return; } - if ( bIsClient ) + // convert address of client + const CHostAddress RecHostAddr ( SenderAddress, SenderPort ); + + if ( bIsClient ) { // client // check if packet comes from the server we want to connect