* Curtis L. Olson -- Saturday 13 December 2003 01:38:
> Strange, someone suggested this as a fix.
This "someone" obviously worked on a server. The following patch
should fix client mode. (Works for me. I didn't test server mode.)
m.
Index: sg_socket.cxx
===================================================================
RCS file: /var/cvs/SimGear-0.3/SimGear/simgear/io/sg_socket.cxx,v
retrieving revision 1.3
diff -u -p -r1.3 sg_socket.cxx
--- sg_socket.cxx 27 Nov 2003 13:24:26 -0000 1.3
+++ sg_socket.cxx 13 Dec 2003 01:04:13 -0000
@@ -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 lengt
// 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 );
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel