summaryrefslogtreecommitdiff
path: root/tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.cpp')
-rw-r--r--tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.cpp b/tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.cpp
index e774c62fe..f144a9f3b 100644
--- a/tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.cpp
+++ b/tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.cpp
@@ -148,12 +148,11 @@ const unsigned char *TcpStream::readFully(void *buf, size_t len)
{
if (!valid()) return NULL;
if (!buf) {
- ERR("TcpStream::readFully failed, buf=NULL");
return NULL; // do not allow NULL buf in that implementation
}
size_t res = len;
while (res > 0) {
- ssize_t stat = ::recv(m_sock, (char *)(buf) + len - res, len, 0);
+ ssize_t stat = ::recv(m_sock, (char *)(buf) + len - res, res, 0);
if (stat == 0) {
// client shutdown;
return NULL;
@@ -161,7 +160,6 @@ const unsigned char *TcpStream::readFully(void *buf, size_t len)
if (errno == EINTR) {
continue;
} else {
- ERR("TcpStream::readFully failed (buf 0x%x): %s\n", buf, strerror(errno));
return NULL;
}
} else {
@@ -175,7 +173,6 @@ const unsigned char *TcpStream::read( void *buf, size_t *inout_len)
{
if (!valid()) return NULL;
if (!buf) {
- ERR("TcpStream::read failed, buf=NULL");
return NULL; // do not allow NULL buf in that implementation
}