Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 13, 2009, 5:05:17 PM (16 years ago)
Author:
dafrick
Message:

Hopefully merged trunk successfully into pickup branch.

Location:
code/branches/pickup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup

  • code/branches/pickup/src/libraries/network/ServerConnection.cc

    r5781 r5935  
    103103  {
    104104    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     else
    115       ServerConnection::disconnectClient( client );
    116105  }
    117106 
     
    119108    ClientInformation *client = ClientInformation::findClient(clientID);
    120109    if(client)
    121       disconnectClient(client);
     110      ServerConnection::disconnectClient(client);
    122111  }
    123112
     
    126115    ClientInformation *temp = ClientInformation::getBegin();
    127116    while(temp!=0){
    128       disconnectClient( temp );
     117      ServerConnection::disconnectClient( temp );
    129118      temp = temp->next();
    130119    }
     
    141130          break;
    142131        case ENET_EVENT_TYPE_DISCONNECT:
    143           if(ClientInformation::findClient(&(event.peer->address)))
    144             delete ClientInformation::findClient(&(event.peer->address));
     132          removePeer( &event );
    145133          temp = ClientInformation::getBegin();
    146134          break;
Note: See TracChangeset for help on using the changeset viewer.