mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 12:15:16 +02:00
Add handleComainConnectionDeniedPacket to Application
This commit is contained in:
parent
b960d86f80
commit
0b0446e527
2 changed files with 16 additions and 2 deletions
|
@ -3815,6 +3815,21 @@ void Application::domainConnectionDenied(const QString& reason) {
|
|||
}
|
||||
}
|
||||
|
||||
void handleDomainConnectionDeniedPacket(std::unique_ptr<NLPacket>, HifiSockAddr senderSockAddr) {
|
||||
int headerSize = numBytesForPacketHeaderGivenPacketType(PacketType::DomainConnectionDenied);
|
||||
QDataStream packetStream(QByteArray(incomingPacket.constData() + headerSize,
|
||||
incomingPacket.size() - headerSize));
|
||||
QString reason;
|
||||
packetStream >> reason;
|
||||
|
||||
// output to the log so the user knows they got a denied connection request
|
||||
// and check and signal for an access token so that we can make sure they are logged in
|
||||
qCDebug(interfaceapp) << "The domain-server denied a connection request: " << reason;
|
||||
qCDebug(interfaceapp) << "You may need to re-log to generate a keypair so you can provide a username signature.";
|
||||
domainConnectionDenied(reason);
|
||||
AccountManager::getInstance().checkAndSignalForAccessToken();
|
||||
}
|
||||
|
||||
void Application::connectedToDomain(const QString& hostname) {
|
||||
AccountManager& accountManager = AccountManager::getInstance();
|
||||
const QUuid& domainID = DependencyManager::get<NodeList>()->getDomainHandler().getUUID();
|
||||
|
|
|
@ -445,6 +445,7 @@ public slots:
|
|||
void notifyPacketVersionMismatch();
|
||||
|
||||
void domainConnectionDenied(const QString& reason);
|
||||
void handleDomainConnectionDeniedPacket(std::unique_ptr<NLPacket>, HifiSockAddr senderSockAddr);
|
||||
|
||||
void cameraMenuChanged();
|
||||
|
||||
|
@ -528,8 +529,6 @@ private:
|
|||
ToolWindow* _toolWindow;
|
||||
WebWindowClass* _friendsWindow;
|
||||
|
||||
DatagramProcessor* _datagramProcessor;
|
||||
|
||||
QUndoStack _undoStack;
|
||||
UndoStackScriptingInterface _undoStackScriptingInterface;
|
||||
|
||||
|
|
Loading…
Reference in a new issue