const bool quitSuccess = wait(500);
- kDebug(5011) << "Quit VNC thread success:" << quitSuccess;
+ kDebug(5011) << "~VncClientThread(): Quit VNC thread success:" << quitSuccess;
delete [] frameBuffer;
- delete cl;
+ //cl is free()d when event loop exits.
}
void VncClientThread::checkOutputErrorMessage()
void VncClientThread::stop()
{
- QMutexLocker locker(&mutex);
+//TODO: not locking the mutex leads to a crash, but at least it stops.
m_stopped = true;
}
QMutexLocker locker(&mutex);
while (!m_stopped) { // try to connect as long as the server allows
+ kDebug(5011) << "enter loop";
m_passwordError = false;
rfbClientLog = outputHandler;
// Main VNC event loop
while (!m_stopped) {
+ kDebug(5011) << "entering main event loop";
const int i = WaitForMessage(cl, 500);
if (i < 0)
break;