Sync ENet with latest cvs commit

git-svn-id: https://svn.eduke32.com/eduke32@1769 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2011-01-16 04:13:40 +00:00
parent cdad4ea850
commit 6420384b6c
2 changed files with 5 additions and 1 deletions

View file

@ -108,6 +108,8 @@ enet_peer_send (ENetPeer * peer, enet_uint8 channelID, ENetPacket * packet)
return -1;
fragmentLength = peer -> mtu - sizeof (ENetProtocolHeader) - sizeof (ENetProtocolSendFragment);
if (peer -> host -> checksum != NULL)
fragmentLength -= sizeof(enet_uint32);
if (packet -> dataLength > fragmentLength)
{

View file

@ -1305,7 +1305,9 @@ enet_protocol_send_reliable_outgoing_commands (ENetHost * host, ENetPeer * peer)
if (outgoingCommand -> packet != NULL)
{
if (peer -> reliableDataInTransit + outgoingCommand -> fragmentLength > peer -> windowSize)
enet_uint32 windowSize = (peer -> packetThrottle * peer -> windowSize) / ENET_PEER_PACKET_THROTTLE_SCALE;
if (peer -> reliableDataInTransit + outgoingCommand -> fragmentLength > ENET_MAX (windowSize, peer -> mtu))
break;
if ((enet_uint16) (peer -> mtu - host -> packetSize) < (enet_uint16) (commandSize + outgoingCommand -> fragmentLength))