mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-15 17:37:12 -05:00
output packet error with some details (inspired by Phenom-PR289)
This commit is contained in:
parent
a3890ad1c3
commit
3554e48c7e
@ -29,6 +29,7 @@
|
||||
#include <time.h>
|
||||
#include "util/rsdebug.h"
|
||||
#include "util/rsstring.h"
|
||||
#include "util/rsprint.h"
|
||||
|
||||
#include "pqi/pqistreamer.h"
|
||||
#include "rsserver/p3face.h"
|
||||
@ -837,6 +838,12 @@ continue_packet:
|
||||
#ifdef DEBUG_PQISTREAMER
|
||||
pqioutput(PQL_ALERT, pqistreamerzone, "Failed to handle Packet!");
|
||||
#endif
|
||||
std::cerr << "Incoming Packet could not be deserialised:" << std::endl;
|
||||
std::cerr << " Incoming peer id: " << PeerId() << std::endl;
|
||||
if(pktlen >= 8)
|
||||
std::cerr << " Packet header : " << RsUtil::BinToHex((unsigned char*)block,8) << std::endl;
|
||||
if(pktlen > 8)
|
||||
std::cerr << " Packet data : " << RsUtil::BinToHex((unsigned char*)block+8,std::min(50u,pktlen-8)) << ((pktlen>58)?"...":"") << std::endl;
|
||||
}
|
||||
|
||||
mReading_state = reading_state_initial ; // restart at state 1.
|
||||
|
Loading…
Reference in New Issue
Block a user