many changes, need testing

rewrite PIDiagnostics, but not fully testing
change PIQueue to PIDeque
many fixes in PIBaseTransfer, it will be threadsafe and stable


git-svn-id: svn://db.shs.com.ru/pip@187 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2016-04-12 04:24:57 +00:00
parent 741615b9d3
commit b93205f175
10 changed files with 462 additions and 202 deletions

View File

@@ -211,7 +211,7 @@ PIByteArray PIFileTransfer::buildPacket(Part p) {
bytes_file_cur = p.start;
return ba;
}
return PIByteArray();
return ba;
}
@@ -286,11 +286,12 @@ void PIFileTransfer::receive_finished(bool ok) {
if (!ok || !user_ok) {
pftheader.session_id--;
started_ = false;
piCoutObj << "file cancel";
receiveFilesFinished(false);
} else resume();
}
if (pftheader.step == pft_Data) {
//piCout << "file close";
//piCoutObj << "file close";
work_file.close();
started_ = false;
receiveFilesFinished(ok);
@@ -299,7 +300,9 @@ void PIFileTransfer::receive_finished(bool ok) {
void PIFileTransfer::send_finished(bool ok) {
//piCout << "file close";
work_file.close();
started_ = false;
// piCoutObj << "file close";
if (pftheader.step == pft_Data) {
work_file.close();
started_ = false;
}
}