From: ehofman Date: Sun, 14 Dec 2003 10:07:51 +0000 (+0000) Subject: Make sure both client and server situations are hendled properly X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a659969bcfe16bf6557519346b9d4c46afe95f97;p=simgear.git Make sure both client and server situations are hendled properly --- 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 );