mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 12:24:24 -04:00
added debug info to packet errormessage for devs
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3977 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ee5417e46a
commit
107d904c22
1 changed files with 4 additions and 5 deletions
|
@ -708,7 +708,7 @@ continue_packet:
|
||||||
{
|
{
|
||||||
void *extradata = (void *) (((char *) block) + blen);
|
void *extradata = (void *) (((char *) block) + blen);
|
||||||
int tmplen ;
|
int tmplen ;
|
||||||
// memset((void*)( &(((unsigned char *)block)[blen])),0,extralen) ; // reset the block, to avoid uninitialized memory reads.
|
// reset the block, to avoid uninitialized memory reads.
|
||||||
memset( extradata,0,extralen ) ; // for checking later
|
memset( extradata,0,extralen ) ; // for checking later
|
||||||
|
|
||||||
if (extralen != (tmplen = bio->readdata(extradata, extralen)))
|
if (extralen != (tmplen = bio->readdata(extradata, extralen)))
|
||||||
|
@ -741,9 +741,7 @@ continue_packet:
|
||||||
msgout << "Please contact the developers.";
|
msgout << "Please contact the developers.";
|
||||||
msgout << "\n";
|
msgout << "\n";
|
||||||
|
|
||||||
std::string msg = msgout.str();
|
msgout << "block = "
|
||||||
std::cerr << msg << std::endl ;
|
|
||||||
std::cerr << "block = "
|
|
||||||
<< (int)(((unsigned char*)block)[0]) << " "
|
<< (int)(((unsigned char*)block)[0]) << " "
|
||||||
<< (int)(((unsigned char*)block)[1]) << " "
|
<< (int)(((unsigned char*)block)[1]) << " "
|
||||||
<< (int)(((unsigned char*)block)[2]) << " "
|
<< (int)(((unsigned char*)block)[2]) << " "
|
||||||
|
@ -753,7 +751,8 @@ continue_packet:
|
||||||
<< (int)(((unsigned char*)block)[6]) << " "
|
<< (int)(((unsigned char*)block)[6]) << " "
|
||||||
<< (int)(((unsigned char*)block)[7]) << " "
|
<< (int)(((unsigned char*)block)[7]) << " "
|
||||||
<< std::endl ;
|
<< std::endl ;
|
||||||
notify->AddSysMessage(0, RS_SYS_WARNING, title, msg);
|
|
||||||
|
notify->AddSysMessage(0, RS_SYS_WARNING, title, msgout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
bio->close();
|
bio->close();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue