Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+16
-16
@@ -77,7 +77,7 @@ LoginInformation LtsProjectionWorkstation::pendingLoginRequest()
|
||||
|
||||
LoginInformation result = *m_pendingLoginRequest;
|
||||
|
||||
INFO_LOG() << " reset pendingLoginRequest..";
|
||||
INFO_LOG(m_logger) << " reset pendingLoginRequest..";
|
||||
|
||||
delete m_pendingLoginRequest;
|
||||
m_pendingLoginRequest = nullptr;
|
||||
@@ -90,7 +90,7 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
CTS::LoginRequest *login = dynamic_cast<CTS::LoginRequest *>(message);
|
||||
if (login)
|
||||
{
|
||||
INFO_LOG() << "Login request received!"
|
||||
INFO_LOG(m_logger) << "Login request received!"
|
||||
<< ", login->userId()=" << login->userId()
|
||||
<< " with login->priority()=" << login->priority()
|
||||
<< " ;;; m_lastLoginRequest.m_userId=" << m_lastLoginRequest.m_userId
|
||||
@@ -108,16 +108,16 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
|
||||
|
||||
|
||||
DEBUG_LOG() << "Login request received and DedicatedDisconnect distributed, wait some seconds...";
|
||||
DEBUG_LOG(m_logger) << "Login request received and DedicatedDisconnect distributed, wait some seconds...";
|
||||
int i=0;
|
||||
while(i<20)
|
||||
{
|
||||
DEBUG_LOG() << "Login request received and DedicatedDisconnect distributed, wait some seconds...i=" << i;
|
||||
DEBUG_LOG(m_logger) << "Login request received and DedicatedDisconnect distributed, wait some seconds...i=" << i;
|
||||
qApp->processEvents(QEventLoop::AllEvents, 50);
|
||||
QThread::msleep(50);
|
||||
++i;
|
||||
}
|
||||
INFO_LOG() << "Login request received and DedicatedDisconnect distributed, wait some seconds... done";
|
||||
INFO_LOG(m_logger) << "Login request received and DedicatedDisconnect distributed, wait some seconds... done";
|
||||
|
||||
|
||||
login->addReply((new STC::LoginRequestReply(QUuid::createUuid().toString(),
|
||||
@@ -133,10 +133,10 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
|
||||
slotLoginRequestReceived(login->userId(), login->exerciseId());
|
||||
|
||||
INFO_LOG() << "Valid login request received -> userId: " << login->userId()
|
||||
INFO_LOG(m_logger) << "Valid login request received -> userId: " << login->userId()
|
||||
<< " priority: " << login->priority()
|
||||
<< " exerciseId: " << login->exerciseId();
|
||||
DEBUG_LOG() << "Logging in now!";
|
||||
DEBUG_LOG(m_logger) << "Logging in now!";
|
||||
|
||||
}
|
||||
else
|
||||
@@ -147,17 +147,17 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
QVector<VncScreen>())
|
||||
)->toReplyMessage());
|
||||
|
||||
DEBUG_LOG() << "Higher prioritized login received -> userId: " << login->userId()
|
||||
DEBUG_LOG(m_logger) << "Higher prioritized login received -> userId: " << login->userId()
|
||||
<< " priority: " << login->priority()
|
||||
<< " exerciseId: " << login->exerciseId();
|
||||
|
||||
DEBUG_LOG() << "Last login data was -> userId: " << m_lastLoginRequest.m_userId
|
||||
DEBUG_LOG(m_logger) << "Last login data was -> userId: " << m_lastLoginRequest.m_userId
|
||||
<< " priority: " << m_lastLoginRequest.m_priority
|
||||
<< " exerciseId: " << m_lastLoginRequest.m_exerciseId;
|
||||
}
|
||||
}
|
||||
else
|
||||
ERROR_LOG() << "invalid login request received -> userId: " << login->userId()
|
||||
ERROR_LOG(m_logger) << "invalid login request received -> userId: " << login->userId()
|
||||
<< " priority: " << login->priority()
|
||||
<< " exerciseId: " << login->exerciseId();
|
||||
|
||||
@@ -167,7 +167,7 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
CTS::LogoutRequest *logout = dynamic_cast<CTS::LogoutRequest *>(message);
|
||||
if (logout)
|
||||
{
|
||||
DEBUG_LOG() << "Logging out now!";
|
||||
DEBUG_LOG(m_logger) << "Logging out now!";
|
||||
slotLogoutRequestReceived();
|
||||
return;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
|
||||
|
||||
int disconnectingUserId = discon->userId();
|
||||
INFO_LOG() << "Disconnecting now! "
|
||||
INFO_LOG(m_logger) << "Disconnecting now! "
|
||||
<< ", disconnectingUserId=" << disconnectingUserId
|
||||
<< ", m_pendingLoginRequest=" << m_pendingLoginRequest;
|
||||
m_lastLoginRequest = LoginInformation();
|
||||
@@ -194,7 +194,7 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
|
||||
void LtsProjectionWorkstation::slotLoginRequestReceived(int userId, int exerciseId)
|
||||
{
|
||||
INFO_LOG() << "slotLoginRequestReceived.."
|
||||
INFO_LOG(m_logger) << "slotLoginRequestReceived.."
|
||||
<< ", userId=" << userId
|
||||
<< ", exerciseId=" << exerciseId;
|
||||
delete m_pendingLoginRequest;
|
||||
@@ -219,17 +219,17 @@ void LtsProjectionWorkstation::slotLogoffDone()
|
||||
|
||||
void LtsProjectionWorkstation::clientDisconnected(LtsWebSocket::ClientConnection *client)
|
||||
{
|
||||
INFO_LOG() << Q_FUNC_INFO << " START"
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " START"
|
||||
<< ", m_connections.size = " << m_connections.size();
|
||||
|
||||
m_connections.removeOne(client);
|
||||
|
||||
if ( m_connections.size() == 0 && (m_lastLoginRequest.m_userId != 0 || m_lastLoginRequest.m_priority != 0))
|
||||
{
|
||||
INFO_LOG() << Q_FUNC_INFO << " reset m_lastLoginRequest";
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " reset m_lastLoginRequest";
|
||||
m_lastLoginRequest = LoginInformation();
|
||||
}
|
||||
INFO_LOG() << Q_FUNC_INFO << " END"
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " END"
|
||||
<< ", m_connections.size = " << m_connections.size();
|
||||
}
|
||||
|
||||
|
||||
+13
-13
@@ -48,7 +48,7 @@ bool VncServerManager::init(const QList<QScreen *> &screens)
|
||||
|
||||
const auto sortedScreens = sortScreen(screens);
|
||||
|
||||
DEBUG_LOG() << "Setup VNCScreens with " << screens.size() << " screens";
|
||||
DEBUG_LOG(m_logger) << "Setup VNCScreens with " << screens.size() << " screens";
|
||||
|
||||
int count = 1;
|
||||
|
||||
@@ -77,13 +77,13 @@ bool VncServerManager::init(const QList<QScreen *> &screens)
|
||||
count++;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << m_vncScreens.size() << " VNCScreen(s) created - Setup completed.";
|
||||
DEBUG_LOG(m_logger) << m_vncScreens.size() << " VNCScreen(s) created - Setup completed.";
|
||||
return true;
|
||||
}
|
||||
|
||||
void VncServerManager::startScreens()
|
||||
{
|
||||
DEBUG_LOG() << "Starting " << m_vncScreens.size() << " VNCScreen(s) ... ";
|
||||
DEBUG_LOG(m_logger) << "Starting " << m_vncScreens.size() << " VNCScreen(s) ... ";
|
||||
for (const VncScreen &s : std::as_const(m_vncScreens))
|
||||
{
|
||||
connect(s.proc, &QProcess::readyReadStandardOutput,
|
||||
@@ -95,16 +95,16 @@ void VncServerManager::startScreens()
|
||||
for (const VncScreen &s : std::as_const(m_vncScreens))
|
||||
{
|
||||
if (!s.proc->waitForStarted(2000))
|
||||
ERROR_LOG() << "Can not start process '" << s.proc->program() << "': "
|
||||
ERROR_LOG(m_logger) << "Can not start process '" << s.proc->program() << "': "
|
||||
<< s.proc->errorString();
|
||||
}
|
||||
DEBUG_LOG() << "Done";
|
||||
DEBUG_LOG(m_logger) << "Done";
|
||||
}
|
||||
|
||||
|
||||
void VncServerManager::stopScreens()
|
||||
{
|
||||
DEBUG_LOG() << "Stopping " << m_vncScreens.size() << " VNCScreen(s) ...";
|
||||
DEBUG_LOG(m_logger) << "Stopping " << m_vncScreens.size() << " VNCScreen(s) ...";
|
||||
|
||||
for (const VncScreen &s : std::as_const(m_vncScreens))
|
||||
{
|
||||
@@ -116,28 +116,28 @@ void VncServerManager::stopScreens()
|
||||
if (!s.proc->waitForFinished(2000))
|
||||
s.proc->kill();
|
||||
}
|
||||
DEBUG_LOG() << "Done";
|
||||
DEBUG_LOG(m_logger) << "Done";
|
||||
}
|
||||
|
||||
|
||||
void VncServerManager::killScreens()
|
||||
{
|
||||
DEBUG_LOG() << "Killing all exisiting x11vnc processes ...";
|
||||
DEBUG_LOG(m_logger) << "Killing all exisiting x11vnc processes ...";
|
||||
|
||||
SingleShotProcess ssp(QStringLiteral("killall x11vnc"));
|
||||
ssp.execute();
|
||||
DEBUG_LOG() << "Done";
|
||||
DEBUG_LOG(m_logger) << "Done";
|
||||
}
|
||||
|
||||
|
||||
void VncServerManager::createPwdFile()
|
||||
{
|
||||
DEBUG_LOG() << "(Re)creating x11vnc password-file ...";
|
||||
DEBUG_LOG(m_logger) << "(Re)creating x11vnc password-file ...";
|
||||
|
||||
SingleShotProcess ssp(QStringLiteral("x11vnc -storepasswd ctc11de %1/.vnc/passwd")
|
||||
.arg(QDir::home().absolutePath()));
|
||||
ssp.execute();
|
||||
DEBUG_LOG() << "Done";
|
||||
DEBUG_LOG(m_logger) << "Done";
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ void VncServerManager::slotReadStandardOutput()
|
||||
QRegularExpressionMatch match = QRegularExpression(QStringLiteral("PORT=(.*?)\\s")).match(stdOut);
|
||||
if (!match.hasMatch())
|
||||
{
|
||||
WARNING_LOG() << "Could not retrieve port information from stdout of " << p->program();
|
||||
WARNING_LOG(m_logger) << "Could not retrieve port information from stdout of " << p->program();
|
||||
return;
|
||||
}
|
||||
const quint16 port = match.capturedRef(1).toInt();
|
||||
@@ -172,7 +172,7 @@ void VncServerManager::slotErrorOccured()
|
||||
{
|
||||
QProcess *p = qobject_cast<QProcess *>(QObject::sender());
|
||||
if (p)
|
||||
ERROR_LOG() << p->errorString();
|
||||
ERROR_LOG(m_logger) << p->errorString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user