#include <boost/assert.hpp>
+#include <logfunc.hpp>
+
using namespace std;
using boost::scoped_array;
+using I2n::Logger::GlobalLogger;
//-----------------------------------------------------------------------------
// IcmpMessagePayload
char *data_array = reinterpret_cast<char *> ( Payload.get() );
(void) is.read( data_array, PayloadSizeInBytes );
- BOOST_ASSERT( static_cast<size_t>(is.gcount()) == PayloadSizeInBytes );
+ size_t data_received_in_bytes = static_cast<size_t>( is.gcount() );
+ if ( data_received_in_bytes != PayloadSizeInBytes )
+ {
+ GlobalLogger.error() << "Error: expecting " << PayloadSizeInBytes
+ << " bytes, but received " << is.gcount() << " bytes" << endl;
+ }
return is;
}