Changeset 5929 for code/trunk/src/libraries/network/ServerConnection.cc
- Timestamp:
- Oct 12, 2009, 8:20:07 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core5 (added) merged: 5768-5769,5772,5775-5780,5783-5785,5791-5792,5795-5807,5809-5814,5816-5832,5836-5839,5842-5853,5855-5899,5904-5922,5924-5928
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/network/ServerConnection.cc
- Property svn:eol-style set to native
r5781 r5929 103 103 { 104 104 Connection::disconnectPeer( client->getPeer() ); 105 delete client;106 }107 108 void ServerConnection::disconnectPeer( ENetEvent* event )109 {110 COUT(4) << "removing client from list" << std::endl;111 ClientInformation *client = ClientInformation::findClient(&event->peer->address);112 if(!client)113 return;114 else115 ServerConnection::disconnectClient( client );116 105 } 117 106 … … 119 108 ClientInformation *client = ClientInformation::findClient(clientID); 120 109 if(client) 121 disconnectClient(client);110 ServerConnection::disconnectClient(client); 122 111 } 123 112 … … 126 115 ClientInformation *temp = ClientInformation::getBegin(); 127 116 while(temp!=0){ 128 disconnectClient( temp );117 ServerConnection::disconnectClient( temp ); 129 118 temp = temp->next(); 130 119 } … … 141 130 break; 142 131 case ENET_EVENT_TYPE_DISCONNECT: 143 if(ClientInformation::findClient(&(event.peer->address))) 144 delete ClientInformation::findClient(&(event.peer->address)); 132 removePeer( &event ); 145 133 temp = ClientInformation::getBegin(); 146 134 break;
Note: See TracChangeset
for help on using the changeset viewer.