Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9531 in orxonox.OLD for branches/proxy/src/lib


Ignore:
Timestamp:
Jul 27, 2006, 9:59:32 PM (18 years ago)
Author:
patrick
Message:

found the bug reason: assigning an individual address space for every server (proxy and master)

Location:
branches/proxy/src/lib/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/README.NETWORK

    r9514 r9531  
    4949
    5050
     51The ids are created by the master/proxy servers. Each server receives an address space of 1000 nodes where it is able to assign nodes to. This address space could be extended quite easely, since we got plenty of numbers in 4bytes (integer)
     52
     53
    5154
    5255uniqueId:
  • branches/proxy/src/lib/network/network_stream.cc

    r9494 r9531  
    388388      if ( freeSocketSlots.size() > 0 )
    389389      {
     390        // this should never be called
     391        assert(false);
    390392        userId = freeSocketSlots.back();
    391393        freeSocketSlots.pop_back();
     
    393395      else
    394396      {
    395         userId = 1;
     397        //userId = 1;
     398        // each server (proxy and master) have an address space for new network nodes of 1000 nodes
     399        userId = SharedNetworkData::getInstance()->getHostID() * 1000;
    396400
    397401        for ( PeerList::iterator it = peers.begin(); it != peers.end(); it++ )
    398402          if ( it->first >= userId )
    399403            userId = it->first + 1;
     404
     405        assert( userId < (SharedNetworkData::getInstance()->getHostID() + 1) * 1000);
    400406      }
    401407      // this creates a new entry in the peers list
  • branches/proxy/src/lib/network/player_stats.cc

    r9530 r9531  
    141141void PlayerStats::setPlayableUniqueId( int uniqueId )
    142142{
    143   PRINTF(0)("SET PLAYABLE!!!!!!!!!!11\n\n");
    144143  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
    145144
Note: See TracChangeset for help on using the changeset viewer.