git-svn-id: svn://db.shs.com.ru/pip@407 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -255,7 +255,9 @@ bool PIBaseTransfer::send_process() {
|
|||||||
mutex_header.lock();
|
mutex_header.lock();
|
||||||
sendReply(pt_Pause);
|
sendReply(pt_Pause);
|
||||||
mutex_header.unlock();
|
mutex_header.unlock();
|
||||||
if (pause_tm.elapsed_s() > timeout())return finish_send(false);
|
if (pause_tm.elapsed_s() > timeout()) {
|
||||||
|
return finish_send(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mutex_send.lock();
|
mutex_send.lock();
|
||||||
if (send_tm.elapsed_s() > timeout_) {
|
if (send_tm.elapsed_s() > timeout_) {
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ bool PIFileTransfer::sendFiles(const PIVector<PFTFileInfo> &files) {
|
|||||||
cur_file_string = "";
|
cur_file_string = "";
|
||||||
if (!send_process()) {
|
if (!send_process()) {
|
||||||
sendFilesFinished(false);
|
sendFilesFinished(false);
|
||||||
|
started_ = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
pftheader.step = pft_Data;
|
pftheader.step = pft_Data;
|
||||||
@@ -99,6 +100,7 @@ bool PIFileTransfer::sendFiles(const PIVector<PFTFileInfo> &files) {
|
|||||||
buildSession(pts);
|
buildSession(pts);
|
||||||
bool ok = send_process();
|
bool ok = send_process();
|
||||||
sendFilesFinished(ok);
|
sendFilesFinished(ok);
|
||||||
|
started_ = false;
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,16 +287,16 @@ void PIFileTransfer::receive_finished(bool ok) {
|
|||||||
}
|
}
|
||||||
if (!ok || !user_ok) {
|
if (!ok || !user_ok) {
|
||||||
pftheader.session_id--;
|
pftheader.session_id--;
|
||||||
started_ = false;
|
|
||||||
piCoutObj << "file cancel";
|
piCoutObj << "file cancel";
|
||||||
receiveFilesFinished(false);
|
receiveFilesFinished(false);
|
||||||
|
started_ = false;
|
||||||
} else resume();
|
} else resume();
|
||||||
}
|
}
|
||||||
if (pftheader.step == pft_Data) {
|
if (pftheader.step == pft_Data) {
|
||||||
//piCoutObj << "file close";
|
//piCoutObj << "file close";
|
||||||
work_file.close();
|
work_file.close();
|
||||||
started_ = false;
|
|
||||||
receiveFilesFinished(ok);
|
receiveFilesFinished(ok);
|
||||||
|
started_ = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,6 +305,5 @@ void PIFileTransfer::send_finished(bool ok) {
|
|||||||
// piCoutObj << "file close";
|
// piCoutObj << "file close";
|
||||||
if (pftheader.step == pft_Data) {
|
if (pftheader.step == pft_Data) {
|
||||||
work_file.close();
|
work_file.close();
|
||||||
started_ = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user