[enet-cvs] CVS: enet protocol.c,1.25,1.26
Lee Salzman
enet at sferik.cubik.org
Sat Dec 13 16:36:06 PST 2003
Update of /home/enet/cvsroot/enet
In directory sferik:/tmp/cvs-serv1930
Modified Files:
protocol.c
Log Message:
another big oops, need to actually deliver the connect event!
Index: protocol.c
===================================================================
RCS file: /home/enet/cvsroot/enet/protocol.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- protocol.c 2003/12/13 19:26:36 1.25
+++ protocol.c 2003/12/14 00:36:04 1.26
@@ -508,7 +508,7 @@
}
static void
-enet_protocol_handle_verify_connect (ENetHost * host, ENetPeer * peer, const ENetProtocol * command)
+enet_protocol_handle_verify_connect (ENetHost * host, ENetEvent * event, ENetPeer * peer, const ENetProtocol * command)
{
enet_uint16 mtu;
enet_uint32 windowSize;
@@ -555,6 +555,13 @@
peer -> incomingBandwidth = ENET_NET_TO_HOST_32 (command -> verifyConnect.incomingBandwidth);
peer -> outgoingBandwidth = ENET_NET_TO_HOST_32 (command -> verifyConnect.outgoingBandwidth);
+
+ host -> recalculateBandwidthLimits = 1;
+
+ peer -> state = ENET_PEER_STATE_CONNECTED;
+
+ event -> type = ENET_EVENT_TYPE_CONNECT;
+ event -> peer = peer;
}
static int
@@ -635,7 +642,7 @@
break;
case ENET_PROTOCOL_COMMAND_VERIFY_CONNECT:
- enet_protocol_handle_verify_connect (host, peer, command);
+ enet_protocol_handle_verify_connect (host, event, peer, command);
break;
More information about the enet-cvs
mailing list