mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
bugFix refact 0
This commit is contained in:
@@ -154,7 +154,7 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
continue;
|
||||
}
|
||||
|
||||
quint64 toFile = file.write(tmpBlock);
|
||||
qint64 toFile = file.write(tmpBlock);
|
||||
emit sigSendDebugLog(Tools::getTime() + "CLIENT: toFile :" + toFile);
|
||||
|
||||
sizeReceiveData += toFile;
|
||||
@@ -278,12 +278,8 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
emit signal_AnswerDocsChanged();
|
||||
}
|
||||
|
||||
//if(packetType == PacketType::TYPE_XMLANSWER_QUERY_LIST_SUB_PROC_AMM)
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
//А)xml-ответы на запросы к БД
|
||||
//А)xml-ответы на запросы к БД (или автоматическая рассылка)
|
||||
//B)перечни Подпроцедур
|
||||
switch(packetType)
|
||||
{
|
||||
@@ -304,15 +300,16 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
stream.startTransaction();
|
||||
stream >> fileSize;
|
||||
|
||||
if(!stream.commitTransaction()){
|
||||
if(!stream.commitTransaction())
|
||||
{
|
||||
emit sigSendDebugLog(Tools::getTime() + "CLIENT: fileSize - FAIL commitTransaction");
|
||||
|
||||
if (!socket->waitForReadyRead(TCP_READ_TIMEOUT)) {
|
||||
if (!socket->waitForReadyRead(TCP_READ_TIMEOUT))
|
||||
{
|
||||
emit sigSendDebugLog(Tools::getTime() + "CLIENT: ERROR! readyRead timeout - fileSize!!!");
|
||||
return;
|
||||
}
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
emit sigSendDebugLog("CLIENT: filesize: " + QString::number(fileSize));
|
||||
@@ -332,13 +329,16 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
stream.startTransaction();
|
||||
stream >> tmpBlock;
|
||||
|
||||
if(!stream.commitTransaction()){
|
||||
if(!stream.commitTransaction())
|
||||
{
|
||||
|
||||
if(socket->state() == QAbstractSocket::UnconnectedState){
|
||||
if(socket->state() == QAbstractSocket::UnconnectedState)
|
||||
{
|
||||
emit sigSocketDisabled();
|
||||
return;
|
||||
}
|
||||
if(socket->waitForReadyRead(TCP_READ_TIMEOUT)){
|
||||
if(socket->waitForReadyRead(TCP_READ_TIMEOUT))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -349,7 +349,6 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
|
||||
emit sigSendDebugLog(Tools::getTime() + "CLIENT: toFile :" + array.size());
|
||||
|
||||
//sizeReceiveData += array.size();
|
||||
sizeReceiveData = array.size();
|
||||
countSend++;
|
||||
|
||||
@@ -384,21 +383,6 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
}
|
||||
|
||||
packetType = PacketType::TYPE_NONE;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
QByteArray array;
|
||||
stream.startTransaction();
|
||||
stream >> array;
|
||||
|
||||
if(!stream.commitTransaction())
|
||||
continue;
|
||||
|
||||
xmlParserQueryToDB(packetType, array);
|
||||
|
||||
packetType = PacketType::TYPE_NONE;
|
||||
*/
|
||||
}
|
||||
break;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user