ui: Prevent network message handling without valid licence
Message by the ide com. controller are now caught by the licence checker to prevent them from causing trouble when waiting for the licence. bug id = 45
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
|
||||
IDECommunicationController::IDECommunicationController(StorageAccess* storageAccess)
|
||||
: m_storageAccess(storageAccess)
|
||||
, m_enabled(true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -24,6 +25,11 @@ IDECommunicationController::~IDECommunicationController()
|
||||
|
||||
void IDECommunicationController::handleIncomingMessage(const std::string& message)
|
||||
{
|
||||
if (m_enabled == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
NetworkProtocolHelper::MESSAGE_TYPE type = NetworkProtocolHelper::getMessageType(message);
|
||||
|
||||
if (type == NetworkProtocolHelper::MESSAGE_TYPE::UNKNOWN)
|
||||
@@ -40,6 +46,16 @@ void IDECommunicationController::handleIncomingMessage(const std::string& messag
|
||||
}
|
||||
}
|
||||
|
||||
bool IDECommunicationController::getEnabled() const
|
||||
{
|
||||
return m_enabled;
|
||||
}
|
||||
|
||||
void IDECommunicationController::setEnabled(const bool enabled)
|
||||
{
|
||||
m_enabled = enabled;
|
||||
}
|
||||
|
||||
void IDECommunicationController::handleSetActiveTokenMessage(const NetworkProtocolHelper::SetActiveTokenMessage& message)
|
||||
{
|
||||
if (message.valid)
|
||||
|
||||
Reference in New Issue
Block a user