diff options
Diffstat (limited to 'lib/libtdekrb/src/tdekrbserversocket.cpp')
-rw-r--r-- | lib/libtdekrb/src/tdekrbserversocket.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/libtdekrb/src/tdekrbserversocket.cpp b/lib/libtdekrb/src/tdekrbserversocket.cpp index e1e2c02..8e5c071 100644 --- a/lib/libtdekrb/src/tdekrbserversocket.cpp +++ b/lib/libtdekrb/src/tdekrbserversocket.cpp @@ -23,6 +23,7 @@ #include <tqapplication.h> #include <tqbuffer.h> +#include <tqeventloop.h> #include <sasl.h> #include <saslplug.h> @@ -33,17 +34,17 @@ #define NET_SEC_BUF_SIZE (2048) // When control comes back from processEvents() my object may be completely gone! This attempts to mitigate the risk -#define SAFELY_PROCESS_EVENTS if (!m_canary) { \ - m_canary = new bool; \ - *m_canary = false; \ - } \ - bool* canary = m_canary; \ - tqApp->processEvents(); \ - if (*canary == true) { \ - delete canary; \ - return -1; \ - } \ - delete m_canary; \ +#define SAFELY_PROCESS_EVENTS if (!m_canary) { \ + m_canary = new bool; \ + *m_canary = false; \ + } \ + bool* canary = m_canary; \ + tqApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); \ + if (*canary == true) { \ + delete canary; \ + return -1; \ + } \ + delete m_canary; \ m_canary = NULL; /* exception handling */ |