From 07a92fb2c2dfc86386cec6d0c6423ecd6e73853e Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Thu, 7 May 2020 18:19:12 +0200 Subject: [PATCH] if -p [port] is given for the client, you get [port]+10 -> change this to that you get what you set (if available) --- src/socket.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/socket.cpp b/src/socket.cpp index f4cdf5f1..ebcddb5d 100755 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -65,11 +65,9 @@ void CSocket::Init ( const quint16 iPortNumber ) } else { - // Per definition use the port number plus ten for the client to make - // it possible to run server and client on the same computer. If the - // port is not available, try "NUM_SOCKET_PORTS_TO_TRY" times with - // incremented port numbers. - quint16 iClientPortIncrement = 10; // start value: port nubmer plus ten + // if the port is not available, try "NUM_SOCKET_PORTS_TO_TRY" times + // with incremented port numbers + quint16 iClientPortIncrement = 0; bSuccess = false; // initialization for while loop while ( !bSuccess && ( iClientPortIncrement <= NUM_SOCKET_PORTS_TO_TRY ) )