]> git.mxchange.org Git - simgear.git/commitdiff
Attempt to fix a bug in SGSocket::read() affecting TCP style sockets.
authorcurt <curt>
Thu, 27 Nov 2003 13:24:26 +0000 (13:24 +0000)
committercurt <curt>
Thu, 27 Nov 2003 13:24:26 +0000 (13:24 +0000)
simgear/io/sg_socket.cxx

index 0ac45a80e407a8875d5193c7d497ee54a29abc3e..4ee0eba2e8a3ac863987cd80de4d18c5e776b01e 100644 (file)
@@ -218,7 +218,14 @@ SGSocket::read( char *buf, int length )
 
     if (result > 0)
     {
-       result = sock.recv( buf, length );
+       if (is_tcp)
+       {
+            result = client->recv( buf, length );
+        }
+        else
+        {
+            result = sock.recv( buf, length );
+        }
 
        if ( result != length )
        {