- Timestamp:
- Oct 13, 2009, 5:05:17 PM (16 years ago)
- Location:
- code/branches/pickup
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup
- Property svn:mergeinfo changed
-
code/branches/pickup/src/libraries/network/ServerConnection.cc
r5781 r5935 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.