summaryrefslogtreecommitdiff
path: root/i/simulotron/src/socket/socket_client.cc
diff options
context:
space:
mode:
authorhaller2005-12-05 17:33:22 +0000
committerhaller2005-12-05 17:33:22 +0000
commit578af6c6ae714fb3f88a822b5e27ebf83c6e1e84 (patch)
tree15366b25af1a1df83b6b65b165e7382a9a052aa7 /i/simulotron/src/socket/socket_client.cc
parent0f7f2e0fa814487238c9158795806b813283c66a (diff)
* Correction d'un bug dans SocketClient (read)
Diffstat (limited to 'i/simulotron/src/socket/socket_client.cc')
-rw-r--r--i/simulotron/src/socket/socket_client.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/i/simulotron/src/socket/socket_client.cc b/i/simulotron/src/socket/socket_client.cc
index 1224389..9099089 100644
--- a/i/simulotron/src/socket/socket_client.cc
+++ b/i/simulotron/src/socket/socket_client.cc
@@ -72,8 +72,9 @@ SocketClient::read (void)
charReaded = ::read (socket_, buffer, BUFFER_SIZE - 1);
if (charReaded < 0)
throw errno_exception ("SocketClient: problème de lecture", errno);
- buffer[charReaded] = 0;
- str += buffer;
+ //buffer[charReaded] = 0;
+ //str += buffer;
+ str.append(buffer, charReaded);
}while (charReaded == BUFFER_SIZE - 1);
return str;
}