Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1500


Ignore:
Timestamp:
Jun 1, 2008, 2:43:27 PM (16 years ago)
Author:
scheusso
Message:

we are now able to manage multiple clients ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/network/ConnectionManager.cc

    r1499 r1500  
    152152  bool ConnectionManager::addPacket(ENetPacket *packet, int clientID) {
    153153    ClientInformation *temp = head_->findClient(clientID);
    154     if(!temp)
    155       return false;
    156     boost::recursive_mutex::scoped_lock lock(enet_mutex_);
    157     if(enet_peer_send(temp->getPeer(), (enet_uint8)clientID, packet)!=0)
    158       return false;
     154    if(!temp){
     155      COUT(3) << "C.Man: addPacket findClient failed" << std::endl;
     156      return false;
     157    }
     158    boost::recursive_mutex::scoped_lock lock(enet_mutex_);
     159    if(enet_peer_send(temp->getPeer(), 0, packet)!=0){
     160      COUT(3) << "C.Man: addPacket enet_peer_send failed" << std::endl;
     161      return false;
     162    }
    159163    return true;
    160164  }
Note: See TracChangeset for help on using the changeset viewer.