Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jul 28, 2006, 11:12:32 AM (18 years ago)
Author:
patrick
Message:

initializing the default values in a better way to prevent missunderstandings

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

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/handshake.cc

    r9494 r9545  
    7171  remoteState.error = 0;
    7272  remoteState.errorString = "";
    73   remoteState.hostId = -1;
     73  remoteState.hostId = NET_ID_UNASSIGNED;
    7474  remoteState.networkManagerId = -1;
    7575  remoteState.messageManagerId = -1;
  • branches/proxy/src/lib/network/network_stream.cc

    r9544 r9545  
    494494  peers[userId].connectionMonitor = new ConnectionMonitor( userId );
    495495  peers[userId].userId = userId;
    496   PRINTF(0)("Setting client userId to%i\n", userId);
    497496
    498497  PRINTF(0)("num sync: %d\n", synchronizeables.size());
     
    585584            // - client       <==> master server
    586585            // - proxy server <==> master server
    587             if(  SharedNetworkData::getInstance()->isClient() || SharedNetworkData::getInstance()->isProxyServerActive() && it->second.isMasterServer())
     586            if(  SharedNetworkData::getInstance()->isClient() ||
     587                 SharedNetworkData::getInstance()->isProxyServerActive() &&
     588                 SharedNetworkData::getInstance()->isUserMasterServer(it->second.userId))
    588589            {
    589590              PRINTF(0)("Handshake: i am in client role\n");
  • branches/proxy/src/lib/network/peer_info.cc

    r9494 r9545  
    4242void PeerInfo::clear()
    4343{
    44   this->userId = 0;
    45   this->nodeType = NET_CLIENT;
     44  this->userId = NET_ID_UNASSIGNED;
     45  this->nodeType = NET_UNASSIGNED;
    4646  this->socket = NULL;
    4747  this->handshake = NULL;
Note: See TracChangeset for help on using the changeset viewer.