From da0d410b8d307f5e0722b4ca20b8868a3e431057 Mon Sep 17 00:00:00 2001 From: drbob Date: Fri, 29 Jul 2011 15:20:40 +0000 Subject: [PATCH] * Added further debug to pqistreamer. * clear mOldNatHole/NatType during netReset. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4497 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/p3netmgr.cc | 4 ++++ libretroshare/src/pqi/pqistreamer.cc | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/pqi/p3netmgr.cc b/libretroshare/src/pqi/p3netmgr.cc index a5d3a04a1..89fc7b7af 100644 --- a/libretroshare/src/pqi/p3netmgr.cc +++ b/libretroshare/src/pqi/p3netmgr.cc @@ -1783,6 +1783,10 @@ void p3NetMgrIMPL::updateNetStateBox_reset() RsStackMutex stack(mNetMtx); /****** STACK LOCK MUTEX *******/ mNetStateBox.reset(); + + mOldNatHole = RSNET_NATHOLE_UNKNOWN; + mOldNatType = RSNET_NATTYPE_UNKNOWN; + } } diff --git a/libretroshare/src/pqi/pqistreamer.cc b/libretroshare/src/pqi/pqistreamer.cc index ceac1b876..624aff2f3 100644 --- a/libretroshare/src/pqi/pqistreamer.cc +++ b/libretroshare/src/pqi/pqistreamer.cc @@ -683,7 +683,11 @@ continue_packet: << (int)(((unsigned char*)block)[0]) << " " << (int)(((unsigned char*)block)[1]) << " " << (int)(((unsigned char*)block)[2]) << " " - << (int)(((unsigned char*)block)[3]) << "\n" ; + << (int)(((unsigned char*)block)[3]) << " " + << (int)(((unsigned char*)block)[4]) << " " + << (int)(((unsigned char*)block)[5]) << " " + << (int)(((unsigned char*)block)[6]) << " " + << (int)(((unsigned char*)block)[7]) << "\n" ; msgout << "\n"; msgout << "Please get your friends to upgrade to the latest version"; msgout << "\n"; @@ -695,6 +699,11 @@ continue_packet: std::string msg = msgout.str(); notify->AddLogMessage(0, RS_SYS_WARNING, title, msg); + + std::cerr << "pqistreamer::handle_incoming() ERROR: Read Packet too Big" << std::endl; + std::cerr << msgout.str(); + std::cerr << std::endl; + } bio->close(); reading_state = reading_state_initial ; // restart at state 1.