small change

This commit is contained in:
Volker Fischer 2008-01-27 11:51:59 +00:00
parent a8ef2fabef
commit d39cb59c03

View File

@ -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