From 665b31165837d89ac9b64f9d9a540d0b87ae19e5 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 24 May 2011 18:55:56 +0000 Subject: Added some empty files that will become my new random number generator system, also fixed a bug in TcpSocket that caused the system to think the socket was closed when it just connected too quickly. --- src/random.cpp | 0 src/random.h | 0 src/randombase.cpp | 0 src/randombase.h | 0 src/randombasic.cpp | 0 src/randombasic.h | 0 src/tcpsocket.cpp | 2 +- 7 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 src/random.cpp create mode 100644 src/random.h create mode 100644 src/randombase.cpp create mode 100644 src/randombase.h create mode 100644 src/randombasic.cpp create mode 100644 src/randombasic.h (limited to 'src') diff --git a/src/random.cpp b/src/random.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/random.h b/src/random.h new file mode 100644 index 0000000..e69de29 diff --git a/src/randombase.cpp b/src/randombase.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/randombase.h b/src/randombase.h new file mode 100644 index 0000000..e69de29 diff --git a/src/randombasic.cpp b/src/randombasic.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/randombasic.h b/src/randombasic.h new file mode 100644 index 0000000..e69de29 diff --git a/src/tcpsocket.cpp b/src/tcpsocket.cpp index 105529a..399ec44 100644 --- a/src/tcpsocket.cpp +++ b/src/tcpsocket.cpp @@ -165,7 +165,7 @@ Bu::size Bu::TcpSocket::read( void *pBuf, Bu::size nBytes ) { int nRead = TEMP_FAILURE_RETRY( bu_recv( nTcpSocket, (char *) pBuf, nBytes, 0 ) ); - if( nRead == 0 ) + if( nRead == 0 && nBytes > 0 ) { close(); throw TcpSocketException( TcpSocketException::cClosed, "TcpSocket closed."); -- cgit v1.2.3