From d7a8d67d760a80962821f6951caee5a9c807f5be Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 13 Nov 2011 09:27:52 +0100 Subject: Imported nxcomp-3.1.0-6.tar.gz Summary: Imported nxcomp-3.1.0-6.tar.gz Keywords: Imported nxcomp-3.1.0-6.tar.gz into Git repository --- nxcomp/CHANGELOG | 12 ++++++++++++ nxcomp/Control.cpp | 2 +- nxcomp/Loop.cpp | 8 ++++---- nxcomp/Proxy.cpp | 34 +++++++++++----------------------- nxcomp/ServerProxy.cpp | 2 +- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/nxcomp/CHANGELOG b/nxcomp/CHANGELOG index a3e68f694..12b77e5a5 100755 --- a/nxcomp/CHANGELOG +++ b/nxcomp/CHANGELOG @@ -1,5 +1,17 @@ ChangeLog: +nxcomp-3.1.0-6 + +- Always use a timeout of 50 ms to update the congestion counter. + +nxcomp-3.1.0-5 + +- Solve the possible deadlock caused by both proxies running out of + tokens at the same time. + +- In ServerProxy::handleCheckDrop() copy the list since the function + can delete the elements. + nxcomp-3.1.0-4 - Classes ProxyReadBuffer and ServerReadBuffer returned an invalid diff --git a/nxcomp/Control.cpp b/nxcomp/Control.cpp index 62c5cbe59..e6693d44c 100755 --- a/nxcomp/Control.cpp +++ b/nxcomp/Control.cpp @@ -94,7 +94,7 @@ // the proxy is idle for this time. // -#define IDLE_TIMEOUT 0 +#define IDLE_TIMEOUT 50 // // Close X connection if can't write before this diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp index ede10e98d..0a5b3a2eb 100755 --- a/nxcomp/Loop.cpp +++ b/nxcomp/Loop.cpp @@ -12745,7 +12745,7 @@ int SetLinkIsdn() control -> SplitTimeout = 50; control -> MotionTimeout = 20; - control -> IdleTimeout = 20; + control -> IdleTimeout = 50; control -> PackMethod = PACK_ADAPTIVE; control -> PackQuality = 5; @@ -12775,7 +12775,7 @@ int SetLinkAdsl() control -> SplitTimeout = 50; control -> MotionTimeout = 10; - control -> IdleTimeout = 10; + control -> IdleTimeout = 50; control -> PackMethod = PACK_ADAPTIVE; control -> PackQuality = 7; @@ -12805,7 +12805,7 @@ int SetLinkWan() control -> SplitTimeout = 50; control -> MotionTimeout = 5; - control -> IdleTimeout = 5; + control -> IdleTimeout = 50; control -> PackMethod = PACK_ADAPTIVE; control -> PackQuality = 9; @@ -12835,7 +12835,7 @@ int SetLinkLan() control -> SplitTimeout = 50; control -> MotionTimeout = 0; - control -> IdleTimeout = 0; + control -> IdleTimeout = 50; control -> PackMethod = PACK_ADAPTIVE; control -> PackQuality = 9; diff --git a/nxcomp/Proxy.cpp b/nxcomp/Proxy.cpp index 371dfe645..54a5af406 100755 --- a/nxcomp/Proxy.cpp +++ b/nxcomp/Proxy.cpp @@ -3647,32 +3647,20 @@ int Proxy::handlePing() if (diffPing >= (control -> PingTimeout - control -> LatencyTimeout * 5)) { - if (tokens_[token_control].remaining > 0) - { - #if defined(TEST) || defined(INFO) || defined(PING) - *logofs << "Proxy: Sending a new ping at " << strMsTimestamp() - << " with " << tokens_[token_control].remaining - << " tokens and elapsed in " << diffIn << " out " - << diffOut << " ping " << diffPing - << ".\n" << logofs_flush; - #endif - - if (handleFrame(frame_ping) < 0) - { - return -1; - } - - timeouts_.pingTs = nowTs; - } #if defined(TEST) || defined(INFO) || defined(PING) - else + *logofs << "Proxy: Sending a new ping at " << strMsTimestamp() + << " with " << tokens_[token_control].remaining + << " tokens and elapsed in " << diffIn << " out " + << diffOut << " ping " << diffPing + << ".\n" << logofs_flush; + #endif + + if (handleFrame(frame_ping) < 0) { - *logofs << "Proxy: WARNING! Can't send a new ping " - << "with no tokens and elapsed in " << diffIn - << " out " << diffOut << " ping " << diffPing - << ".\n" << logofs_flush; + return -1; } - #endif + + timeouts_.pingTs = nowTs; } #if defined(TEST) || defined(INFO) || defined(PING) else diff --git a/nxcomp/ServerProxy.cpp b/nxcomp/ServerProxy.cpp index 943696582..3f81ba73a 100755 --- a/nxcomp/ServerProxy.cpp +++ b/nxcomp/ServerProxy.cpp @@ -410,7 +410,7 @@ int ServerProxy::handleNewXConnectionFromProxy(int channelId) int ServerProxy::handleCheckDrop() { - T_list &channelList = activeChannels_.getList(); + T_list channelList = activeChannels_.copyList(); for (T_list::iterator j = channelList.begin(); j != channelList.end(); j++) -- cgit v1.2.3