aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/Proxy.cpp
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-11-13 09:27:53 +0100
committerReinhard Tartler <siretart@tauware.de>2011-11-13 09:27:53 +0100
commit232dfc41d41390bfffa75ec2ed065c109fa03a0e (patch)
tree117e97e14682515b570713a52c3c55ded2fb00da /nxcomp/Proxy.cpp
parent233de71fc954b38f6be286e28e525e50533f9c49 (diff)
downloadnx-libs-232dfc41d41390bfffa75ec2ed065c109fa03a0e.tar.gz
nx-libs-232dfc41d41390bfffa75ec2ed065c109fa03a0e.tar.bz2
nx-libs-232dfc41d41390bfffa75ec2ed065c109fa03a0e.zip
Imported nxcomp-3.5.0-2.tar.gznxcomp/3.5.0-2nxcomp
Summary: Imported nxcomp-3.5.0-2.tar.gz Keywords: Imported nxcomp-3.5.0-2.tar.gz into Git repository
Diffstat (limited to 'nxcomp/Proxy.cpp')
-rw-r--r--nxcomp/Proxy.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/nxcomp/Proxy.cpp b/nxcomp/Proxy.cpp
index 347dd5add..3b4df7eb6 100644
--- a/nxcomp/Proxy.cpp
+++ b/nxcomp/Proxy.cpp
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */
/* NXCOMP, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -1626,6 +1626,23 @@ int Proxy::handleControlFromProxy(const unsigned char *message)
int channelId = *(message + 2);
//
+ // Check if the channel has been dropped.
+ //
+
+ if (channels_[channelId] != NULL &&
+ (channels_[channelId] -> getDrop() == 1 ||
+ channels_[channelId] -> getClosing() == 1))
+ {
+ #ifdef TEST
+ *logofs << "Proxy: Dropping the descriptor FD#"
+ << getFd(channelId) << " channel ID#"
+ << channelId << ".\n" << logofs_flush;
+ #endif
+
+ handleDrop(channelId);
+ }
+
+ //
// Check if the channel is in the valid
// range.
//