aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Base/HttpServerBase.cs
diff options
context:
space:
mode:
authorMelanie2009-09-28 22:57:38 +0100
committerMelanie2009-09-28 22:57:38 +0100
commitfe3760e4a2b130a46f2439d9a258255c155f6042 (patch)
tree6f895e9a28c351a83318af66c6b7da55750f826c /OpenSim/Server/Base/HttpServerBase.cs
parentBump version number in post-fixes (diff)
parentAllow the notation config_name@port/dll_name:class_name as a handler spec (diff)
downloadopensim-SC_OLD-fe3760e4a2b130a46f2439d9a258255c155f6042.zip
opensim-SC_OLD-fe3760e4a2b130a46f2439d9a258255c155f6042.tar.gz
opensim-SC_OLD-fe3760e4a2b130a46f2439d9a258255c155f6042.tar.bz2
opensim-SC_OLD-fe3760e4a2b130a46f2439d9a258255c155f6042.tar.xz
Merge branch 'master' into 0.6.7-post-fixes
Conflicts: OpenSim/Framework/Servers/VersionInfo.cs
Diffstat (limited to 'OpenSim/Server/Base/HttpServerBase.cs')
-rw-r--r--OpenSim/Server/Base/HttpServerBase.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs
index 791e1ef..6a1f37c 100644
--- a/OpenSim/Server/Base/HttpServerBase.cs
+++ b/OpenSim/Server/Base/HttpServerBase.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic;
29using System.Threading; 30using System.Threading;
30using System.Reflection; 31using System.Reflection;
31using OpenSim.Framework; 32using OpenSim.Framework;
@@ -45,12 +46,27 @@ namespace OpenSim.Server.Base
45 // The http server instance 46 // The http server instance
46 // 47 //
47 protected BaseHttpServer m_HttpServer = null; 48 protected BaseHttpServer m_HttpServer = null;
49 protected uint m_Port = 0;
50 protected Dictionary<uint, BaseHttpServer> m_Servers =
51 new Dictionary<uint, BaseHttpServer>();
48 52
49 public IHttpServer HttpServer 53 public IHttpServer HttpServer
50 { 54 {
51 get { return m_HttpServer; } 55 get { return m_HttpServer; }
52 } 56 }
53 57
58 public IHttpServer GetHttpServer(uint port)
59 {
60 if (port == m_Port)
61 return HttpServer;
62
63 if (m_Servers.ContainsKey(port))
64 return m_Servers[port];
65
66 m_Servers[port] = new BaseHttpServer(port);
67 return m_Servers[port];
68 }
69
54 // Handle all the automagical stuff 70 // Handle all the automagical stuff
55 // 71 //
56 public HttpServerBase(string prompt, string[] args) : base(prompt, args) 72 public HttpServerBase(string prompt, string[] args) : base(prompt, args)
@@ -74,6 +90,8 @@ namespace OpenSim.Server.Base
74 Thread.CurrentThread.Abort(); 90 Thread.CurrentThread.Abort();
75 } 91 }
76 92
93 m_Port = port;
94
77 m_HttpServer = new BaseHttpServer(port); 95 m_HttpServer = new BaseHttpServer(port);
78 96
79 MainServer.Instance = m_HttpServer; 97 MainServer.Instance = m_HttpServer;