Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9483 in orxonox.OLD


Ignore:
Timestamp:
Jul 26, 2006, 10:41:33 AM (18 years ago)
Author:
patrick
Message:

giving the proxy server more rights to write the clients

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

Legend:

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

    r9481 r9483  
    583583              this->pInfo->userId = SharedNetworkData::getInstance()->getHostID();
    584584
    585               it->second.ip = it->second.socket->getRemoteAddress();
     585#warning the ip address is not set here because it results in a segfault when connecting to a proxy server => trace this later
     586//               it->second.ip = it->second.socket->getRemoteAddress();
    586587
    587588              // it->second.nodeType = it->second.handshake->getRemoteNodeType();
  • branches/proxy/src/lib/network/synchronizeable.cc

    r9474 r9483  
    223223      hasPermission = true;
    224224    // SPECIAL: get write permissions if i am master server and i am able to overwrite the client stuff
     225#warning this could probably override also clients that are connected to another proxy: the master server overwrites it
    225226    else if( SharedNetworkData::getInstance()->isMasterServer() && this->owner != userId && (*it)->checkPermission( PERMISSION_OWNER ))
    226227      hasPermission = true;
    227228    // SPECIAL: get write permissions if i am proxy server and i am able to overwrite the client stuff
    228 //     else if( SharedNetworkData::getInstance()->isProxyServerActive()  && this->owner != userId && (*it)->checkPermission( PERMISSION_OWNER ))
    229 //       hasPermission = true;
     229    else if( SharedNetworkData::getInstance()->isProxyServerActive()  && this->owner != userId &&
     230             (*it)->checkPermission( PERMISSION_OWNER ) && this->networkStream->isUserClient(userId))
     231      hasPermission = true;
    230232    else
    231233      hasPermission = false;
     
    367369      hasPermission = true;
    368370    // SPECIAL: get write permissions if im sending to a proxy server that does not own this sync
    369 //     else if( this->networkStream->isUserProxyServerActive( userId )  && this->owner != SharedNetworkData::getInstance()->getHostID() && (*it)->checkPermission( PERMISSION_OWNER ))
    370 //       hasPermission = true;
     371    else if( this->networkStream->isUserProxyServerActive( userId )  && this->owner != SharedNetworkData::getInstance()->getHostID() && (*it)->checkPermission( PERMISSION_OWNER ) && SharedNetworkData::getInstance()->isClient())
     372      hasPermission = true;
    371373    else
    372374      hasPermission = false;
Note: See TracChangeset for help on using the changeset viewer.