mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 18:02:13 +02:00
add a menu option to force the wrong DS connect version
This commit is contained in:
parent
12e5851ba4
commit
e4ebafa0d8
6 changed files with 25 additions and 0 deletions
|
@ -542,6 +542,9 @@ Menu::Menu() {
|
|||
#if (PR_BUILD || DEV_BUILD)
|
||||
addCheckableActionToQMenuAndActionHash(networkMenu, MenuOption::SendWrongProtocolVersion, 0, false,
|
||||
qApp, SLOT(sendWrongProtocolVersionsSignature(bool)));
|
||||
|
||||
addCheckableActionToQMenuAndActionHash(networkMenu, MenuOption::SendWrongDSConnectVersion, 0, false,
|
||||
nodeList.data(), SLOT(toggleSendNewerDSConnectVersion(bool)));
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -166,6 +166,7 @@ namespace MenuOption {
|
|||
const QString RunTimingTests = "Run Timing Tests";
|
||||
const QString ScriptEditor = "Script Editor...";
|
||||
const QString ScriptedMotorControl = "Enable Scripted Motor Control";
|
||||
const QString SendWrongDSConnectVersion = "Send wrong DS connect version";
|
||||
const QString SendWrongProtocolVersion = "Send wrong protocol version";
|
||||
const QString SetHomeLocation = "Set Home Location";
|
||||
const QString ShowDSConnectTable = "Show Domain Connection Timing";
|
||||
|
|
|
@ -184,6 +184,11 @@ void NLPacket::setType(PacketType type) {
|
|||
writeTypeAndVersion();
|
||||
}
|
||||
|
||||
void NLPacket::setVersion(PacketVersion version) {
|
||||
_version = version;
|
||||
writeTypeAndVersion();
|
||||
}
|
||||
|
||||
void NLPacket::readType() {
|
||||
_type = NLPacket::typeInHeader(*this);
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ public:
|
|||
void setType(PacketType type);
|
||||
|
||||
PacketVersion getVersion() const { return _version; }
|
||||
void setVersion(PacketVersion version);
|
||||
|
||||
const QUuid& getSourceID() const { return _sourceID; }
|
||||
|
||||
|
|
|
@ -296,6 +296,13 @@ void NodeList::sendDomainServerCheckIn() {
|
|||
QDataStream packetStream(domainPacket.get());
|
||||
|
||||
if (domainPacketType == PacketType::DomainConnectRequest) {
|
||||
|
||||
#if (PR_BUILD || DEV_BUILD)
|
||||
if (_shouldSendNewerVersion) {
|
||||
domainPacket->setVersion(versionForPacketType(domainPacketType) + 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
QUuid connectUUID;
|
||||
|
||||
if (!_domainHandler.getAssignmentUUID().isNull()) {
|
||||
|
|
|
@ -85,6 +85,10 @@ public slots:
|
|||
|
||||
void processICEPingPacket(QSharedPointer<ReceivedMessage> message);
|
||||
|
||||
#if (PR_BUILD || DEV_BUILD)
|
||||
void toggleSendNewerDSConnectVersion(bool shouldSendNewerVersion) { _shouldSendNewerVersion = shouldSendNewerVersion; }
|
||||
#endif
|
||||
|
||||
signals:
|
||||
void limitOfSilentDomainCheckInsReached();
|
||||
void receivedDomainServerList();
|
||||
|
@ -124,6 +128,10 @@ private:
|
|||
HifiSockAddr _assignmentServerSocket;
|
||||
bool _isShuttingDown { false };
|
||||
QTimer _keepAlivePingTimer;
|
||||
|
||||
#if (PR_BUILD || DEV_BUILD)
|
||||
bool _shouldSendNewerVersion { false };
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // hifi_NodeList_h
|
||||
|
|
Loading…
Reference in a new issue