X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Fsocket_handler.cpp;h=ed1489581177d6d8b7a8d4df3735280a53892940;hp=ed37e4d739e99088de339260913c6be6511afcb7;hb=6f6d24c02ef3e3a7600432bed1c801a611c3c918;hpb=45a2ebc9695c4d7be6548b7e0f800d117ae56a0b diff --git a/src/socket_handler.cpp b/src/socket_handler.cpp index ed37e4d..ed14895 100644 --- a/src/socket_handler.cpp +++ b/src/socket_handler.cpp @@ -126,6 +126,7 @@ bool socket_handler::data_waiting(long long usec_timeout,long long* usec_timeout int ret=select (FD_SETSIZE, &active_fd_set, NULL, NULL, timeout_ptr); // return the timeout we did not use + // todo: this is linux specific according to man 2 select if (usec_timeout > 0 && usec_timeout_remaining != NULL) *usec_timeout_remaining=(tval.tv_sec*1000000)+tval.tv_usec; @@ -190,7 +191,7 @@ bool socket_handler::fill_buffer(std::string& buffer) // Data read -> store it if (nbytes > 0) { - buffer.assign(socket_buffer,nbytes); + buffer.append(socket_buffer,nbytes); LOGSTREAM(debug,nbytes << " bytes read"); }