[enet-cvs] CVS: enet protocol.c,1.26,1.27

Lee Salzman enet at sferik.cubik.org
Sat Dec 13 17:50:28 PST 2003


Update of /home/enet/cvsroot/enet
In directory sferik:/tmp/cvs-serv2153

Modified Files:
	protocol.c 
Log Message:
sanity check


Index: protocol.c
===================================================================
RCS file: /home/enet/cvsroot/enet/protocol.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- protocol.c	2003/12/14 00:36:04	1.26
+++ protocol.c	2003/12/14 01:50:26	1.27
@@ -25,9 +25,6 @@
        if (currentPeer >= & host -> peers [host -> peerCount])
          currentPeer = host -> peers;
 
-       if (currentPeer -> state == ENET_PEER_STATE_DISCONNECTED)
-         continue;
-
        if (currentPeer -> state == ENET_PEER_STATE_ZOMBIE)
        {
            host -> recalculateBandwidthLimits = 1;
@@ -41,6 +38,9 @@
 
            return 1;
        }
+
+       if (currentPeer -> state != ENET_PEER_STATE_CONNECTED)
+         continue;
 
        for (channel = currentPeer -> channels;
             channel < & currentPeer -> channels [currentPeer -> channelCount];



More information about the enet-cvs mailing list