Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1389


Ignore:
Timestamp:
May 22, 2008, 5:53:24 PM (16 years ago)
Author:
scheusso
Message:

some fixes in client disconnect procedure — mostly because of multithreading

Location:
code/branches/network/src/network
Files:
4 edited

Legend:

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

    r1378 r1389  
    8585  ClientInformation::~ClientInformation() {
    8686    boost::recursive_mutex::scoped_lock lock(mutex_);
    87     if(next()!=0)
     87    if(prev()!=0)
    8888      prev()->setNext(this->next());
    8989    if(next()!=0)
  • code/branches/network/src/network/ClientInformation.h

    r1360 r1389  
    9595    bool setSynched(bool s);
    9696    bool getSynched();
     97    static boost::recursive_mutex mutex_;
    9798
    9899
     
    114115    bool head_;
    115116    unsigned short failures_;
    116     static boost::recursive_mutex mutex_;
    117117   
    118118  };
  • code/branches/network/src/network/ConnectionManager.cc

    r1379 r1389  
    345345 
    346346  bool ConnectionManager::removeClient(int clientID){
     347    boost::recursive_mutex::scoped_lock lock(head_->mutex_);
    347348    orxonox::Iterator<orxonox::SpaceShip> it = orxonox::ObjectList<orxonox::SpaceShip>::start();
    348349    ClientInformation *client = head_->findClient(clientID);
     
    371372    }
    372373    orxonox::SpaceShip *no = dynamic_cast<orxonox::SpaceShip *>(id->fabricate());
    373     no->setPosition(orxonox::Vector3(0,80,0));
     374    no->setPosition(orxonox::Vector3(0,0,80));
    374375    no->setScale(10);
    375     no->setYawPitchRoll(orxonox::Degree(-90),orxonox::Degree(-90),orxonox::Degree(0));
     376    //no->setYawPitchRoll(orxonox::Degree(-90),orxonox::Degree(-90),orxonox::Degree(0));
    376377    no->setMesh("assff.mesh");
    377378    no->setMaxSpeed(500);
  • code/branches/network/src/network/Server.cc

    r1379 r1389  
    4242
    4343#include <iostream>
     44
    4445
    4546#include "ConnectionManager.h"
     
    196197  bool Server::sendGameState() {
    197198    COUT(5) << "Server: starting function sendGameState" << std::endl;
     199    boost::recursive_mutex::scoped_lock lock(clients->mutex_);
    198200    ClientInformation *temp = clients;
    199201    bool added=false;
Note: See TracChangeset for help on using the changeset viewer.