[enet-cvs] CVS: enet peer.c,1.20,1.21 protocol.c,1.31,1.32
Lee Salzman
enet at sferik.cubik.org
Sun Dec 21 19:26:44 PST 2003
Update of /home/enet/cvsroot/enet
In directory sferik:/tmp/cvs-serv30605
Modified Files:
peer.c protocol.c
Log Message:
bug fixes
Index: peer.c
===================================================================
RCS file: /home/enet/cvsroot/enet/peer.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- peer.c 2003/12/17 01:34:50 1.20
+++ peer.c 2003/12/22 03:26:41 1.21
@@ -304,11 +304,6 @@
channel < & peer -> channels [peer -> channelCount];
++ channel)
{
- channel -> outgoingReliableSequenceNumber = 0;
- channel -> outgoingUnreliableSequenceNumber = 0;
- channel -> incomingReliableSequenceNumber = 0;
- channel -> incomingUnreliableSequenceNumber = 0;
-
enet_peer_reset_incoming_commands (& channel -> incomingReliableCommands);
enet_peer_reset_incoming_commands (& channel -> incomingUnreliableCommands);
}
Index: protocol.c
===================================================================
RCS file: /home/enet/cvsroot/enet/protocol.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- protocol.c 2003/12/17 01:34:50 1.31
+++ protocol.c 2003/12/22 03:26:41 1.32
@@ -324,6 +324,9 @@
channel = & peer -> channels [command -> header.channelID];
+ if (startSequenceNumber <= channel -> incomingReliableSequenceNumber)
+ return;
+
for (currentCommand = enet_list_previous (enet_list_end (& channel -> incomingReliableCommands));
currentCommand != enet_list_end (& channel -> incomingReliableCommands);
currentCommand = enet_list_previous (currentCommand))
@@ -1076,9 +1079,9 @@
#ifdef ENET_DEBUG
#ifdef WIN32
- printf ("peer %u: %f%%+-%f%% packet loss, %u+-%u ms round trip time, %f%% throttle, %u/%u outgoing, %u/%u incoming\n", currentPeer -> incomingPeerID, currentPeer -> packetLoss / (float) ENET_PEER_PACKET_LOSS_SCALE, currentPeer -> packetLossVariance / (float) ENET_PEER_PACKET_LOSS_SCALE, currentPeer -> roundTripTime, currentPeer -> roundTripTimeVariance, currentPeer -> packetThrottle / (float) ENET_PEER_PACKET_THROTTLE_SCALE, enet_list_size (& currentPeer -> outgoingReliableCommands), enet_list_size (& currentPeer -> outgoingUnreliableCommands), enet_list_size (& currentPeer -> channels -> incomingReliableCommands), enet_list_size (& currentPeer -> channels -> incomingUnreliableCommands));
+ printf ("peer %u: %f%%+-%f%% packet loss, %u+-%u ms round trip time, %f%% throttle, %u/%u outgoing, %u/%u incoming\n", currentPeer -> incomingPeerID, currentPeer -> packetLoss / (float) ENET_PEER_PACKET_LOSS_SCALE, currentPeer -> packetLossVariance / (float) ENET_PEER_PACKET_LOSS_SCALE, currentPeer -> roundTripTime, currentPeer -> roundTripTimeVariance, currentPeer -> packetThrottle / (float) ENET_PEER_PACKET_THROTTLE_SCALE, enet_list_size (& currentPeer -> outgoingReliableCommands), enet_list_size (& currentPeer -> outgoingUnreliableCommands), peer -> channels != NULL ? enet_list_size (& currentPeer -> channels -> incomingReliableCommands) : 0, enet_list_size (& currentPeer -> channels -> incomingUnreliableCommands));
#else
- fprintf (stderr, "peer %u: %f%%+-%f%% packet loss, %u+-%u ms round trip time, %f%% throttle, %u/%u outgoing, %u/%u incoming\n", currentPeer -> incomingPeerID, currentPeer -> packetLoss / (float) ENET_PEER_PACKET_LOSS_SCALE, currentPeer -> packetLossVariance / (float) ENET_PEER_PACKET_LOSS_SCALE, currentPeer -> roundTripTime, currentPeer -> roundTripTimeVariance, currentPeer -> packetThrottle / (float) ENET_PEER_PACKET_THROTTLE_SCALE, enet_list_size (& currentPeer -> outgoingReliableCommands), enet_list_size (& currentPeer -> outgoingUnreliableCommands), enet_list_size (& currentPeer -> channels -> incomingReliableCommands), enet_list_size (& currentPeer -> channels -> incomingUnreliableCommands));
+ fprintf (stderr, "peer %u: %f%%+-%f%% packet loss, %u+-%u ms round trip time, %f%% throttle, %u/%u outgoing, %u/%u incoming\n", currentPeer -> incomingPeerID, currentPeer -> packetLoss / (float) ENET_PEER_PACKET_LOSS_SCALE, currentPeer -> packetLossVariance / (float) ENET_PEER_PACKET_LOSS_SCALE, currentPeer -> roundTripTime, currentPeer -> roundTripTimeVariance, currentPeer -> packetThrottle / (float) ENET_PEER_PACKET_THROTTLE_SCALE, enet_list_size (& currentPeer -> outgoingReliableCommands), enet_list_size (& currentPeer -> outgoingUnreliableCommands), peer -> channels != NULL ? enet_list_size (& currentPeer -> channels -> incomingReliableCommands) : 0, enet_list_size (& currentPeer -> channels -> incomingUnreliableCommands));
#endif
#endif
More information about the enet-cvs
mailing list