From 8db69d2e02b13edb348a13a33c82eda3f7124636 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 6 Dec 2016 07:26:26 +0000 Subject: [PATCH 1/2] remove redundante check for ssl listener --- OpenSim/Capabilities/Caps.cs | 2 +- OpenSim/Capabilities/CapsHandlers.cs | 28 ++++++---------------------- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/OpenSim/Capabilities/Caps.cs b/OpenSim/Capabilities/Caps.cs index 5e89c388f4..7ba65c9a76 100644 --- a/OpenSim/Capabilities/Caps.cs +++ b/OpenSim/Capabilities/Caps.cs @@ -136,7 +136,7 @@ namespace OpenSim.Framework.Capabilities } m_agentID = agent; - m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort, (httpServer == null) ? false : httpServer.UseSSL); + m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort); m_regionName = regionName; m_capsActive.Reset(); } diff --git a/OpenSim/Capabilities/CapsHandlers.cs b/OpenSim/Capabilities/CapsHandlers.cs index 04cede1144..6ec375b268 100644 --- a/OpenSim/Capabilities/CapsHandlers.cs +++ b/OpenSim/Capabilities/CapsHandlers.cs @@ -53,31 +53,15 @@ namespace OpenSim.Framework.Capabilities /// base HTTP server /// host name of the HTTP server /// HTTP port - public CapsHandlers(BaseHttpServer httpListener, string httpListenerHostname, uint httpListenerPort) - : this(httpListener,httpListenerHostname,httpListenerPort, false) - { - } - - /// - /// CapsHandlers is a cap handler container but also takes - /// care of adding and removing cap handlers to and from the - /// supplied BaseHttpServer. - /// - /// base HTTP server - /// host name of the HTTP - /// server - /// HTTP port - public CapsHandlers(IHttpServer httpListener, string httpListenerHostname, uint httpListenerPort, bool https) - { + public CapsHandlers(IHttpServer httpListener, string httpListenerHostname, uint httpListenerPort) + { m_httpListener = httpListener; m_httpListenerHostName = httpListenerHostname; m_httpListenerPort = httpListenerPort; - m_useSSL = https; - if (httpListener != null && m_useSSL) - { - m_httpListenerHostName = httpListener.SSLCommonName; - m_httpListenerPort = httpListener.SSLPort; - } + if (httpListener.UseSSL) + m_useSSL = true; + else + m_useSSL = false; } /// From 44588ce45ef1d23ca8fedd453e9d2e54f1af27a3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 6 Dec 2016 07:40:45 +0000 Subject: [PATCH 2/2] jenkins likes null httplisteners --- OpenSim/Capabilities/CapsHandlers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Capabilities/CapsHandlers.cs b/OpenSim/Capabilities/CapsHandlers.cs index 6ec375b268..6d3b9b54bf 100644 --- a/OpenSim/Capabilities/CapsHandlers.cs +++ b/OpenSim/Capabilities/CapsHandlers.cs @@ -58,7 +58,7 @@ namespace OpenSim.Framework.Capabilities m_httpListener = httpListener; m_httpListenerHostName = httpListenerHostname; m_httpListenerPort = httpListenerPort; - if (httpListener.UseSSL) + if (httpListener != null && httpListener.UseSSL) m_useSSL = true; else m_useSSL = false;