From ff17a74df8954e3cfac42c1e8c37990573542a45 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Thu, 28 Apr 2022 10:32:55 +0100 Subject: [PATCH] Make missing packets qInfo instead of qDebug --- udphandler.cpp | 8 ++++---- udpserver.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/udphandler.cpp b/udphandler.cpp index f8a5904..a4fe408 100644 --- a/udphandler.cpp +++ b/udphandler.cpp @@ -1377,7 +1377,7 @@ void udpBase::dataReceived(QByteArray r) QMap::iterator s = rxMissing.find(in->seq); if (s != rxMissing.end()) { - qDebug(logUdp()) << this->metaObject()->className() << ": Missing SEQ has been received! " << hex << in->seq; + qInfo(logUdp()) << this->metaObject()->className() << ": Missing SEQ has been received! " << hex << in->seq; s = rxMissing.erase(s); } @@ -1403,7 +1403,7 @@ void udpBase::sendRetransmitRequest() return; } else if (rxMissing.size() > MAX_MISSING) { - qDebug(logUdp()) << "Too many missing packets," << rxMissing.size() << "flushing all buffers"; + qInfo(logUdp()) << "Too many missing packets," << rxMissing.size() << "flushing all buffers"; missingMutex.lock(); rxMissing.clear(); missingMutex.unlock(); @@ -1440,14 +1440,14 @@ void udpBase::sendRetransmitRequest() if (missingSeqs.length() == 4) // This is just a single missing packet so send using a control. { p.seq = (missingSeqs[0] & 0xff) | (quint16)(missingSeqs[1] << 8); - qDebug(logUdp()) << this->metaObject()->className() << ": sending request for missing packet : " << hex << p.seq; + qInfo(logUdp()) << this->metaObject()->className() << ": sending request for missing packet : " << hex << p.seq; udpMutex.lock(); udp->writeDatagram(QByteArray::fromRawData((const char*)p.packet, sizeof(p)), radioIP, port); udpMutex.unlock(); } else { - qDebug(logUdp()) << this->metaObject()->className() << ": sending request for multiple missing packets : " << missingSeqs.toHex(':'); + qInfo(logUdp()) << this->metaObject()->className() << ": sending request for multiple missing packets : " << missingSeqs.toHex(':'); missingMutex.lock(); missingSeqs.insert(0, p.packet, sizeof(p.packet)); missingMutex.unlock(); diff --git a/udpserver.cpp b/udpserver.cpp index 8c21178..73f8c9c 100644 --- a/udpserver.cpp +++ b/udpserver.cpp @@ -1696,7 +1696,7 @@ void udpServer::sendRetransmitRequest(CLIENT* c) return; } else if (c->rxMissing.size() > MAX_MISSING) { - qDebug(logUdp()) << "Too many missing packets," << c->rxMissing.size() << "flushing all buffers"; + qInfo(logUdp()) << "Too many missing packets," << c->rxMissing.size() << "flushing all buffers"; c->rxMutex.lock(); c->rxSeqBuf.clear(); c->rxMutex.unlock(); @@ -1728,7 +1728,7 @@ void udpServer::sendRetransmitRequest(CLIENT* c) else { // We have tried 4 times to request this packet, time to give up! - qDebug(logUdp()) << this->metaObject()->className() << ": No response for missing packet" << it.key() << "deleting"; + qInfo(logUdp()) << this->metaObject()->className() << ": No response for missing packet" << it.key() << "deleting"; it = c->rxMissing.erase(it); } } @@ -1745,7 +1745,7 @@ void udpServer::sendRetransmitRequest(CLIENT* c) if (missingSeqs.length() == 4) // This is just a single missing packet so send using a control. { p.seq = (missingSeqs[0] & 0xff) | (quint16)(missingSeqs[1] << 8); - qDebug(logUdp()) << this->metaObject()->className() << ": sending request for missing packet : " << hex << p.seq; + qInfo(logUdp()) << this->metaObject()->className() << ": sending request for missing packet : " << hex << p.seq; if (udpMutex.try_lock_for(std::chrono::milliseconds(LOCK_PERIOD))) { @@ -1759,7 +1759,7 @@ void udpServer::sendRetransmitRequest(CLIENT* c) } else { - qDebug(logUdp()) << this->metaObject()->className() << ": sending request for multiple missing packets : " << missingSeqs.toHex(); + qInfo(logUdp()) << this->metaObject()->className() << ": sending request for multiple missing packets : " << missingSeqs.toHex(); missingSeqs.insert(0, p.packet, sizeof(p.packet));