git-svn-id: svn://db.shs.com.ru/pip@406 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -13,7 +13,7 @@ PIBaseTransfer::PIBaseTransfer(): crc(standardCRC_16()), diag(false) {
|
||||
bytes_all = bytes_cur = 0;
|
||||
send_queue = 0;
|
||||
timeout_ = 10.;
|
||||
diag.setDisconnectTimeout(timeout_);
|
||||
diag.setDisconnectTimeout(timeout_ / 10);
|
||||
//CONNECTU(&diag, qualityChanged, this, diagChanged);
|
||||
diag.setName("PIBaseTransfer");
|
||||
diag.start(50);
|
||||
@@ -529,13 +529,13 @@ bool PIBaseTransfer::finish_send(bool ok) {
|
||||
is_sending = false;
|
||||
if (ok) state_string = "send done";
|
||||
else state_string = "send failed";
|
||||
//piCoutObj << state_string << PIString::readableSize(bytes_all);
|
||||
mutex_header.lock();
|
||||
header.id = 0;
|
||||
if (!ok) sendBreak(header.session_id);
|
||||
else sendReply(pt_ReplySuccess);
|
||||
mutex_header.unlock();
|
||||
sendFinished(ok);
|
||||
piCoutObj << state_string << PIString::readableSize(bytes_all);
|
||||
// diag.stop();
|
||||
bytes_all = bytes_cur = 0;
|
||||
return ok;
|
||||
@@ -546,13 +546,13 @@ void PIBaseTransfer::finish_receive(bool ok, bool quet) {
|
||||
is_receiving = false;
|
||||
if (ok) state_string = "receive done";
|
||||
else state_string = "receive failed";
|
||||
//piCoutObj << state_string << PIString::readableSize(bytes_all);
|
||||
if (!ok && !quet) {
|
||||
mutex_header.lock();
|
||||
sendBreak(header.session_id);
|
||||
mutex_header.unlock();
|
||||
}
|
||||
receiveFinished(ok);
|
||||
piCoutObj << state_string << PIString::readableSize(bytes_all);
|
||||
// diag.stop();
|
||||
bytes_all = bytes_cur = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user