git-svn-id: svn://db.shs.com.ru/pip@783 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2019-04-18 17:37:34 +00:00
parent 6434d824dc
commit 5668dbcccb
2 changed files with 21 additions and 4 deletions

View File

@@ -141,12 +141,21 @@ void PIStreamPacker::received(const PIByteArray & data) {
if (packet.size_s() == packet_size) {
PIByteArray cd;
if (crypt_frag) {
//piCout << "decrypt frags ..." << packet_size;
while (packet.size_s() >= 4) {
//piCout << "decrypt frags take data ...";
PIByteArray frag;
//piCout << "decrypt frags take data done" << frag.size_s();
packet >> frag;
if (frag.isEmpty()) {
//piCout << "decrypt frags corrupt, break";
cd.clear();
break;
}
cd.append(decryptData(frag));
//piCout << "crypt_frag receive add frag" << frag.size_s();
//piCout << "decrypt frags add" << frag.size_s();
}
//piCout << "decrypt frags done" << cd.size();
} else {
cd = decryptData(packet);
}