summaryrefslogtreecommitdiff
path: root/tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.cpp
diff options
context:
space:
mode:
authorStas Gurtovoy <stas@graphtech.co.il>2011-06-01 11:10:29 +0300
committerGuy Zadickario <guy@graphtech.co.il>2011-06-21 14:48:44 +0300
commit5def410ff53842b04c6c848d0d94d468c68c5a49 (patch)
treebfb39c51111ce7a33d48262a93362173a615da29 /tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.cpp
parent613025efb3dec6961f24882ec1f580f146bf6be8 (diff)
emulator opengl: more few fixups needed for the system to load.
Change-Id: I698b14d0f594c091c237a605aeefbb048bf746ca
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
}