mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
leverage the VerboseLoggingHelper for packets from unknown nodes
This commit is contained in:
parent
9c30903eb6
commit
8a4c716452
2 changed files with 8 additions and 3 deletions
|
@ -19,6 +19,8 @@
|
|||
#include <QtCore/QUrl>
|
||||
#include <QtNetwork/QHostInfo>
|
||||
|
||||
#include <VerboseLoggingHelper.h>
|
||||
|
||||
#include "AccountManager.h"
|
||||
#include "Assignment.h"
|
||||
#include "HifiSockAddr.h"
|
||||
|
@ -211,8 +213,10 @@ bool LimitedNodeList::packetVersionAndHashMatch(const QByteArray& packet) {
|
|||
<< uuidFromPacketHeader(packet);
|
||||
}
|
||||
} else {
|
||||
qDebug() << "Packet of type" << checkType << "received from unknown node with UUID"
|
||||
<< uuidFromPacketHeader(packet);
|
||||
QString unknownPacketString = "%1 packets of type " + QString::number(checkType)
|
||||
+ " received from unknown node with UUID "
|
||||
+ uuidStringWithoutCurlyBraces(uuidFromPacketHeader(packet));
|
||||
VerboseLoggingHelper::getInstance().addMessage(unknownPacketString);
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
|
|
|
@ -28,7 +28,8 @@ VerboseLoggingHelper::VerboseLoggingHelper() {
|
|||
void VerboseLoggingHelper::flushMessages() {
|
||||
QHash<QString, int>::iterator message = _messageCountHash.begin();
|
||||
while (message != _messageCountHash.end()) {
|
||||
qDebug() << message.key().arg(message.value());
|
||||
qDebug() << qPrintable(message.key().arg(message.value()))
|
||||
<< "in last" << VERBOSE_LOG_INTERVAL_SECONDS << "seconds.";
|
||||
message = _messageCountHash.erase(message);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue