From a659969bcfe16bf6557519346b9d4c46afe95f97 Mon Sep 17 00:00:00 2001 From: ehofman Date: Sun, 14 Dec 2003 10:07:51 +0000 Subject: [PATCH] Make sure both client and server situations are hendled properly --- simgear/io/sg_socket.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simgear/io/sg_socket.cxx b/simgear/io/sg_socket.cxx index 4ee0eba2..4012d71a 100644 --- a/simgear/io/sg_socket.cxx +++ b/simgear/io/sg_socket.cxx @@ -218,7 +218,7 @@ SGSocket::read( char *buf, int length ) if (result > 0) { - if (is_tcp) + if (is_tcp && is_server) { result = client->recv( buf, length ); } @@ -257,7 +257,7 @@ SGSocket::readline( char *buf, int length ) // read a chunk, keep in the save buffer until we have the // requested amount read - if (is_tcp) + if (is_tcp && is_server) { char *buf_ptr = save_buf + save_len; result = client->recv( buf_ptr, SG_IO_MAX_MSG_SIZE - save_len ); -- 2.39.2