aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/Loop.cpp
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-05-16 15:12:19 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-05-16 15:12:19 +0200
commit91ac79ecc1fdb18ad90a19e5333f32107e78836f (patch)
tree70958289c2188a2a2f6d3b340422a80a197f41cd /nxcomp/Loop.cpp
parentab96962b14e67fe7a05856758b51d345c5de06fe (diff)
parent4fefe352c9d93b0a51ed2e7c34f47a0d951413db (diff)
downloadnx-libs-91ac79ecc1fdb18ad90a19e5333f32107e78836f.tar.gz
nx-libs-91ac79ecc1fdb18ad90a19e5333f32107e78836f.tar.bz2
nx-libs-91ac79ecc1fdb18ad90a19e5333f32107e78836f.zip
Merge pull request #25 from nitomartinez/nxtranscleanup_for_reconnect
This patch allows to cleanup the nxcomp resources to allow for a seco…
Diffstat (limited to 'nxcomp/Loop.cpp')
-rw-r--r--nxcomp/Loop.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp
index 7bc154f36..f25aed353 100644
--- a/nxcomp/Loop.cpp
+++ b/nxcomp/Loop.cpp
@@ -1311,6 +1311,11 @@ void NXTransCleanup()
HandleCleanup();
}
+void NXTransCleanupForReconnect()
+{
+ HandleCleanupForReconnect();
+}
+
//
// Check the parameters for subsequent
// initialization of the NX transport.
@@ -4873,6 +4878,28 @@ int StartKeeper()
return 1;
}
+void HandleCleanupForReconnect()
+{
+ #ifdef TEST
+ *logofs << "Loop: Going to clean up system resources for Reconnect "
+ << "in process '" << getpid() << "'.\n"
+ << logofs_flush;
+ #endif
+ handleTerminatedInLoop();
+ DisableSignals();
+ if (control)
+ CleanupChildren();
+ CleanupListeners();
+ CleanupSockets();
+ CleanupKeeper();
+ CleanupStreams();
+ CleanupLocal();
+ CleanupGlobal();
+ RestoreSignals();
+ ServerCache::lastInitReply.set(0,NULL);
+ ServerCache::lastKeymap.set(0,NULL);
+ ServerCache::getKeyboardMappingLastMap.set(0,NULL);
+}
void HandleCleanup(int code)
{
#ifdef TEST