mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-05 21:29:23 -04:00
Secured the output of .cfg files and cache files. Now closing RS or serializing errors while saving these files cannot corrupt them anymore.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1090 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
207983a9e5
commit
631e3b303e
4 changed files with 50 additions and 32 deletions
|
@ -500,7 +500,7 @@ int pqistreamer::handleoutgoing()
|
|||
int pqistreamer::handleincoming()
|
||||
{
|
||||
int readbytes = 0;
|
||||
static const int max_failed_read_attempts = 600 ;
|
||||
static const int max_failed_read_attempts = 2000 ;
|
||||
|
||||
{
|
||||
std::ostringstream out;
|
||||
|
@ -557,7 +557,7 @@ start_packet_read:
|
|||
// Most likely it is that the packet is pending but could not be read by pqissl because of stream flow.
|
||||
// So we return without an error, and leave the machine state in 'start_read'.
|
||||
//
|
||||
pqioutput(PQL_WARNING, pqistreamerzone, "pqistreamer::handleincoming() Error in bio read");
|
||||
//pqioutput(PQL_WARNING, pqistreamerzone, "pqistreamer::handleincoming() Error in bio read");
|
||||
// std::cerr << "given up 2, state = " << reading_state << std::endl ;
|
||||
return 0;
|
||||
}
|
||||
|
@ -702,6 +702,7 @@ continue_packet:
|
|||
}
|
||||
}
|
||||
|
||||
failed_read_attempts = 0 ;
|
||||
readbytes += extralen;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue