aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoreihrul <eihrul>2006-03-24 19:13:45 +0000
committereihrul <eihrul>2006-03-24 19:13:45 +0000
commit5a72766ae21d9a513b0bb86714755e69f92b195a (patch)
treea96a4339349d11d2b4c32672ab23c8e73f68629d
parent585319bb63dfca4389fee30ee08b2b99696b544d (diff)
downloadenet-5a72766ae21d9a513b0bb86714755e69f92b195a.tar.gz
enet-5a72766ae21d9a513b0bb86714755e69f92b195a.zip
bug fixes
-rw-r--r--protocol.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/protocol.c b/protocol.c
index 75cdd64..bc1b79c 100644
--- a/protocol.c
+++ b/protocol.c
@@ -722,57 +722,46 @@ enet_protocol_handle_incoming_commands (ENetHost * host, ENetEvent * event)
{
case ENET_PROTOCOL_COMMAND_ACKNOWLEDGE:
enet_protocol_handle_acknowledge (host, event, peer, command);
-
break;
case ENET_PROTOCOL_COMMAND_CONNECT:
peer = enet_protocol_handle_connect (host, header, command);
-
break;
case ENET_PROTOCOL_COMMAND_VERIFY_CONNECT:
enet_protocol_handle_verify_connect (host, event, peer, command);
-
break;
case ENET_PROTOCOL_COMMAND_DISCONNECT:
enet_protocol_handle_disconnect (host, peer, command);
-
break;
case ENET_PROTOCOL_COMMAND_PING:
enet_protocol_handle_ping (host, peer, command);
-
break;
case ENET_PROTOCOL_COMMAND_SEND_RELIABLE:
enet_protocol_handle_send_reliable (host, peer, command);
-
break;
case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE:
enet_protocol_handle_send_unreliable (host, peer, command);
-
break;
case ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED:
enet_protocol_handle_send_unsequenced (host, peer, command);
-
break;
case ENET_PROTOCOL_COMMAND_SEND_FRAGMENT:
enet_protocol_handle_send_fragment (host, peer, command);
-
break;
case ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT:
enet_protocol_handle_bandwidth_limit (host, peer, command);
-
break;
case ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE:
enet_protocol_handle_throttle_configure (host, peer, command);
-
break;
default:
@@ -788,12 +777,17 @@ enet_protocol_handle_incoming_commands (ENetHost * host, ENetEvent * event)
break;
case ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT:
- if (command -> header.command != ENET_PROTOCOL_COMMAND_DISCONNECT)
- break;
+ if ((command -> header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_DISCONNECT)
+ enet_peer_queue_acknowledgement (peer, command, header -> sentTime);
+ break;
+
+ case ENET_PEER_STATE_ACKNOWLEDGING_CONNECT:
+ if ((command -> header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_DISCONNECT)
+ enet_peer_queue_acknowledgement (peer, command, header -> sentTime);
+ break;
default:
enet_peer_queue_acknowledgement (peer, command, header -> sentTime);
-
break;
}
}