Commit fa980027 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Adding more debug print lines part 3

parent 209ab551
...@@ -187,9 +187,21 @@ public: ...@@ -187,9 +187,21 @@ public:
inline bool LoopBody() inline bool LoopBody()
{ {
#ifdef VANET_SERVER_VERBOSE
std::cout << "[ VANetServer ] Loop body enter" << std::endl;
#endif
int nUpdateID = m_oConnMultiplexer.Demultiplex(); int nUpdateID = m_oConnMultiplexer.Demultiplex();
#ifdef VANET_SERVER_VERBOSE
std::cout << "[ VANetServer ] Received an update id " << nUpdateID << " and there are " << m_mapConnections.size() << " available connections" << std::endl;
#endif
if( nUpdateID == 0 ) if( nUpdateID == 0 )
{
return false; return false;
}
else if( nUpdateID < 0 ) else if( nUpdateID < 0 )
{ {
std::cerr << "VA Server: Connection Observer encountered Demultiplex error" << std::endl; std::cerr << "VA Server: Connection Observer encountered Demultiplex error" << std::endl;
...@@ -216,6 +228,14 @@ public: ...@@ -216,6 +228,14 @@ public:
std::cerr << "VA Server: caught exception and will disconnect now (" << e << ")" << std::endl; std::cerr << "VA Server: caught exception and will disconnect now (" << e << ")" << std::endl;
m_pParent->RemoveClient( m_mapConnections[ nUpdateID ], CVANetNetworkProtocol::VA_NET_SERVER_DISCONNECT ); m_pParent->RemoveClient( m_mapConnections[ nUpdateID ], CVANetNetworkProtocol::VA_NET_SERVER_DISCONNECT );
} }
catch( ... )
{
#ifdef VANET_SERVER_VERBOSE
std::cout << "[ VANetServer ] Caught unkown exception." << std::endl;
#endif
}
#else #else
catch( CVAException& ) catch( CVAException& )
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment