Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7774 in orxonox.OLD for branches/network/src


Ignore:
Timestamp:
May 23, 2006, 3:10:57 PM (19 years ago)
Author:
rennerc
Message:

added some debug output to handshake

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

Legend:

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

    r7731 r7774  
    2222#include "handshake.h"
    2323
     24#include "network_log.h"
     25
    2426#include <cassert>
    2527
     
    4143  errorString_handler = registerVarId( new SynchronizeableString( &localState.errorString, &remoteState.errorString, "errorString", PERMISSION_ALL ) );
    4244 
    43   localState.completed = false;
     45  localState.completed = 0;
    4446  localState.error = 0;
    4547  localState.errorString = "";
     
    5052  localState.version = _ORXONOX_VERSION;
    5153 
    52   remoteState.completed = false;
     54  remoteState.completed = 0;
    5355  remoteState.error = 0;
    5456  remoteState.errorString = "";
     
    7678      {
    7779        localState.error = 1;
    78         localState.completed = true;
     80        localState.completed = 1;
    7981        localState.errorString = "Seems not to be orxonox!";
    8082        return;
    8183      }
    8284      else
    83         localState.completed = true;
     85        if ( remoteState.version -= _ORXONOX_VERSION )
     86          localState.completed = 1;
    8487    }
    8588     
     
    8992      {
    9093        localState.error = 2;
    91         localState.completed = true;
     94        localState.completed = 1;
    9295        localState.errorString = "Versions of server and client do not match!";
    9396        return;
    9497      }
    9598      else
    96         localState.completed = true;
     99        if ( remoteState.orxId == _ORXONOX_ID )
     100          localState.completed = 1;
    97101    }
    98102   
    99103  }
     104 
     105  for ( std::list<int>::iterator it = id.begin(); it != id.end(); it++ )
     106  {
     107    if ( *it == netManId_handler )
     108      NETPRINTF(0)("netManId_handler\n");
     109    if ( *it == msgManId_handler )
     110      NETPRINTF(0)("msgManId_handler\n");
     111    if ( *it == hostId_handler )
     112      NETPRINTF(0)("hostId_handler\n");
     113    if ( *it == completed_handler )
     114      NETPRINTF(0)("completed_handler\n");
     115    if ( *it == error_handler )
     116      NETPRINTF(0)("error_handler\n");
     117    if ( *it == errorString_handler )
     118      NETPRINTF(0)("errorString_handler\n");
     119    if ( *it == orxId_handler )
     120      NETPRINTF(0)("orxId_handler\n");
     121    if ( *it == version_handler )
     122      NETPRINTF(0)("version_handler\n");
     123  }
    100124}
    101125
  • branches/network/src/lib/network/network_stream.cc

    r7773 r7774  
    336336            this->networkGameManager->setUniqueID( it->second.handshake->getNetworkGameManagerId() );
    337337            MessageManager::getInstance()->setUniqueID( it->second.handshake->getMessageManagerId() );
    338            
    339            
     338
    340339          }
    341340          else
Note: See TracChangeset for help on using the changeset viewer.