Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 31, 2006, 3:34:56 AM (19 years ago)
Author:
patrick
Message:

tests in redirection forcing

File:
1 edited

Legend:

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

    r9625 r9638  
    135135
    136136  this->currentState = 0;
     137  this->redirectionUID = NET_ID_MASTER_SERVER;
    137138
    138139  remainingBytesToWriteToDict = Preferences::getInstance()->getInt( "compression", "writedict", 0 );
     
    376377    if( this->bRedirect)
    377378    {
    378       this->handleReconnect( NET_ID_MASTER_SERVER);
     379      this->handleReconnect( this->redirectionUID);
    379380    }
    380381  }
     
    815816void NetworkStream::reconnectToServer(IP address)
    816817{
     818  ///TODO make a redirection struct and push it to the network monitor
    817819  this->networkMonitor->setForcedReconnection(address);
    818   this->handleReconnect( NET_ID_MASTER_SERVER);
     820
     821  // reconnect (depending on how we are connected at the moment)
     822  if ( peers.find( NET_ID_MASTER_SERVER) != peers.end() )
     823    this->redirectionUID = NET_ID_MASTER_SERVER;
     824  else if( peers.find( NET_ID_PROXY_SERVER_01) != peers.end() )
     825    this->redirectionUID = NET_ID_PROXY_SERVER_01;
     826
     827  this->bRedirect = true;
    819828}
    820829
Note: See TracChangeset for help on using the changeset viewer.