From f5266b403c50cb2b6d712e6d8f41b62ad2433efb Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 1 May 2008 12:41:31 +0000 Subject: lights --- src/core/netclient.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/core/netclient.cc') diff --git a/src/core/netclient.cc b/src/core/netclient.cc index c910e26..0c0d72a 100644 --- a/src/core/netclient.cc +++ b/src/core/netclient.cc @@ -121,7 +121,6 @@ void NetClient::send(std::string const &msg) void NetClient::transmit(int serverfd) { - if (!sendq.size()) { if (client_keepalive + NETTIMEOUT/2 < application()->time()) { sendq.assign("ping\n"); @@ -129,7 +128,7 @@ void NetClient::transmit(int serverfd) return; } } else if (sendq.size() >= FRAMESIZE) { - con_warn << "Outgoing message exceeds " << FRAMESIZE << " bytes!\n"; + con_warn << "Outgoing message exceeds " << FRAMESIZE -1 << " bytes!\n"; //sendq.clear(); //return; } @@ -137,7 +136,7 @@ void NetClient::transmit(int serverfd) ssize_t bytes_sent = 0; while (sendq.size() && !error()) { - bytes_sent = ::sendto(serverfd, sendq.c_str(), sendq.size(), 0, + bytes_sent = ::sendto(serverfd, sendq.c_str(), sendq.size()+1, 0, (struct sockaddr *)&client_addr, sizeof(client_addr)); if (bytes_sent < 0) { -- cgit v1.2.3