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

Adding more debug print lines part 2

parent a2fd5c37
...@@ -202,10 +202,19 @@ void CVANetMessage::WriteAnswer() ...@@ -202,10 +202,19 @@ void CVANetMessage::WriteAnswer()
{ {
if (!m_pConnection) if (!m_pConnection)
VISTA_THROW("Seems like the VA connections is lost, can not write VA net message answer", 255); VISTA_THROW("Seems like the VA connections is lost, can not write VA net message answer", 255);
#ifdef VANET_NETWORK_COM_PRINT_DEBUG_INFOS
std::cout << "[ VANetMessage ][ DEBUG ] All seems good, will hand over buffer to network connection now" << std::endl;
#endif
// It appears to be safe to transmit an entire buffer of arbitrary size on sender side // It appears to be safe to transmit an entire buffer of arbitrary size on sender side
int nRet = m_pConnection->WriteRawBuffer( m_oOutgoing.GetBuffer(), m_oOutgoing.GetBufferSize() ); int nRet = m_pConnection->WriteRawBuffer( m_oOutgoing.GetBuffer(), m_oOutgoing.GetBufferSize() );
m_pConnection->WaitForSendFinish(); m_pConnection->WaitForSendFinish();
#ifdef VANET_NETWORK_COM_PRINT_DEBUG_INFOS
std::cout << "[ VANetMessage ][ DEBUG ] ... acknowledged." << std::endl;
#endif
if( nRet != m_oOutgoing.GetBufferSize() ) if( nRet != m_oOutgoing.GetBufferSize() )
VISTA_THROW( "Could not write the expected number of bytes", 255 ); VISTA_THROW( "Could not write the expected number of bytes", 255 );
} }
......
...@@ -350,6 +350,11 @@ void CVANetNetworkProtocol::ServerCallFunctionByMessageType( const int nMessageT ...@@ -350,6 +350,11 @@ void CVANetNetworkProtocol::ServerCallFunctionByMessageType( const int nMessageT
bool CVANetNetworkProtocol::ProcessMessageFromClient( VistaConnectionIP* pConnection ) bool CVANetNetworkProtocol::ProcessMessageFromClient( VistaConnectionIP* pConnection )
{ {
#ifdef VANET_NETWORK_COM_PRINT_DEBUG_INFOS
std::cout << "[ VANetProtocol ][ DEBUG ] Processing message from client" << std::endl;
#endif
assert( m_pRealCore != NULL ); assert( m_pRealCore != NULL );
// just to avoid false connection notifies - these can happen // just to avoid false connection notifies - these can happen
...@@ -437,6 +442,10 @@ bool CVANetNetworkProtocol::ProcessMessageFromClient( VistaConnectionIP* pConnec ...@@ -437,6 +442,10 @@ bool CVANetNetworkProtocol::ProcessMessageFromClient( VistaConnectionIP* pConnec
m_pMessage->WriteAnswer(); m_pMessage->WriteAnswer();
} }
#ifdef VANET_NETWORK_COM_PRINT_DEBUG_INFOS
std::cout << "[ VANetProtocol ][ DEBUG ] Processing has successfully processed messagew from client" << std::endl;
#endif
return true; return true;
} }
......
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