remove bytes_to_send == res check.

It seems to cause trouble with mini campaign game creation.
This commit is contained in:
Jon Daniel 2005-08-19 15:31:50 +00:00
parent 739197df16
commit 33fe7d8a6b

View file

@ -80,8 +80,7 @@ SOCKET_STATE send_buf(TCPsocket sock, std::vector<char>& buf) {
if(sockets_locked[sock] != SOCKET_LOCKED)
return SOCKET_ERROR;
}
const int bytes_to_send = static_cast<int>(size - upto);
const int res = SDLNet_TCP_Send(sock, &buf[upto], bytes_to_send);
const int res = SDLNet_TCP_Send(sock, &buf[upto], static_cast<int>(size - upto));
if(res == -1) {
#ifdef EAGAIN
@ -99,9 +98,6 @@ SOCKET_STATE send_buf(TCPsocket sock, std::vector<char>& buf) {
#endif
return SOCKET_ERROR;
}
if(res != bytes_to_send) {
return SOCKET_ERROR;
}
timeout = 15000;
upto += static_cast<size_t>(res);
{