aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs15
-rw-r--r--OpenSim/Framework/Servers/OSHttpRequestPump.cs2
-rw-r--r--OpenSim/Framework/Servers/OSHttpServer.cs12
3 files changed, 17 insertions, 12 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index e57682f..ce351ca 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -84,7 +84,8 @@ namespace OpenSim.Framework.Servers
84 84
85 string handlerKey = GetHandlerKey(httpMethod, path); 85 string handlerKey = GetHandlerKey(httpMethod, path);
86 86
87 lock(m_streamHandlers) { 87 lock (m_streamHandlers)
88 {
88 if (!m_streamHandlers.ContainsKey(handlerKey)) 89 if (!m_streamHandlers.ContainsKey(handlerKey))
89 { 90 {
90 //m_log.DebugFormat("[BASE HTTP SERVER]: Adding handler key {0}", handlerKey); 91 //m_log.DebugFormat("[BASE HTTP SERVER]: Adding handler key {0}", handlerKey);
@@ -100,7 +101,8 @@ namespace OpenSim.Framework.Servers
100 101
101 public bool AddXmlRPCHandler(string method, XmlRpcMethod handler) 102 public bool AddXmlRPCHandler(string method, XmlRpcMethod handler)
102 { 103 {
103 lock(m_rpcHandlers) { 104 lock (m_rpcHandlers)
105 {
104 if (!m_rpcHandlers.ContainsKey(method)) 106 if (!m_rpcHandlers.ContainsKey(method))
105 { 107 {
106 m_rpcHandlers.Add(method, handler); 108 m_rpcHandlers.Add(method, handler);
@@ -114,7 +116,8 @@ namespace OpenSim.Framework.Servers
114 116
115 public bool AddHTTPHandler(string method, GenericHTTPMethod handler) 117 public bool AddHTTPHandler(string method, GenericHTTPMethod handler)
116 { 118 {
117 lock(m_HTTPHandlers) { 119 lock (m_HTTPHandlers)
120 {
118 if (!m_HTTPHandlers.ContainsKey(method)) 121 if (!m_HTTPHandlers.ContainsKey(method))
119 { 122 {
120 m_HTTPHandlers.Add(method, handler); 123 m_HTTPHandlers.Add(method, handler);
@@ -132,7 +135,8 @@ namespace OpenSim.Framework.Servers
132 135
133 public bool AddAgentHandler(string agent, IHttpAgentHandler handler) 136 public bool AddAgentHandler(string agent, IHttpAgentHandler handler)
134 { 137 {
135 lock(m_agentHandlers) { 138 lock (m_agentHandlers)
139 {
136 if (!m_agentHandlers.ContainsKey(agent)) 140 if (!m_agentHandlers.ContainsKey(agent))
137 { 141 {
138 m_agentHandlers.Add(agent, handler); 142 m_agentHandlers.Add(agent, handler);
@@ -171,7 +175,8 @@ namespace OpenSim.Framework.Servers
171 175
172 if (TryGetAgentHandler(request, response, out agentHandler)) 176 if (TryGetAgentHandler(request, response, out agentHandler))
173 { 177 {
174 if (HandleAgentRequest(agentHandler, request, response)) { 178 if (HandleAgentRequest(agentHandler, request, response))
179 {
175 m_log.DebugFormat("[HTTP-AGENT] Handler located for {0}", request.UserAgent); 180 m_log.DebugFormat("[HTTP-AGENT] Handler located for {0}", request.UserAgent);
176 return; 181 return;
177 } 182 }
diff --git a/OpenSim/Framework/Servers/OSHttpRequestPump.cs b/OpenSim/Framework/Servers/OSHttpRequestPump.cs
index 78348bb..8a3e73f 100644
--- a/OpenSim/Framework/Servers/OSHttpRequestPump.cs
+++ b/OpenSim/Framework/Servers/OSHttpRequestPump.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Servers
47 public static OSHttpRequestPump[] Pumps(OSHttpServer server, int poolSize) 47 public static OSHttpRequestPump[] Pumps(OSHttpServer server, int poolSize)
48 { 48 {
49 OSHttpRequestPump[] pumps = new OSHttpRequestPump[poolSize]; 49 OSHttpRequestPump[] pumps = new OSHttpRequestPump[poolSize];
50 for(int i = 0; i < pumps.Length; i++) 50 for (int i = 0; i < pumps.Length; i++)
51 { 51 {
52 pumps[i]._httpServer = server; 52 pumps[i]._httpServer = server;
53 } 53 }
diff --git a/OpenSim/Framework/Servers/OSHttpServer.cs b/OpenSim/Framework/Servers/OSHttpServer.cs
index e6caac3..3aa8042 100644
--- a/OpenSim/Framework/Servers/OSHttpServer.cs
+++ b/OpenSim/Framework/Servers/OSHttpServer.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Framework.Servers
58 58
59 // thread identifier 59 // thread identifier
60 protected string _engineId; 60 protected string _engineId;
61 public string EngineID 61 public string EngineID
62 { 62 {
63 get { return _engineId; } 63 get { return _engineId; }
64 } 64 }
@@ -86,7 +86,7 @@ namespace OpenSim.Framework.Servers
86 /// <summary> 86 /// <summary>
87 /// Instantiate an HTTPS server. 87 /// Instantiate an HTTPS server.
88 /// </summary> 88 /// </summary>
89 public OSHttpServer(IPAddress address, int port, X509Certificate certificate, int poolSize) : 89 public OSHttpServer(IPAddress address, int port, X509Certificate certificate, int poolSize) :
90 this(address, port, poolSize) 90 this(address, port, poolSize)
91 { 91 {
92 _engineId = String.Format("OSHttpServer [HTTPS:{0}/ps:{1}]", port, poolSize); 92 _engineId = String.Format("OSHttpServer [HTTPS:{0}/ps:{1}]", port, poolSize);
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.Servers
96 /// <summary> 96 /// <summary>
97 /// Start the HTTP server engine. 97 /// Start the HTTP server engine.
98 /// </summary> 98 /// </summary>
99 public void Start() 99 public void Start()
100 { 100 {
101 _engine = new Thread(new ThreadStart(Engine)); 101 _engine = new Thread(new ThreadStart(Engine));
102 _engine.Name = _engineId; 102 _engine.Name = _engineId;
@@ -107,13 +107,13 @@ namespace OpenSim.Framework.Servers
107 107
108 /// <summary> 108 /// <summary>
109 /// </summary> 109 /// </summary>
110 private void Engine() 110 private void Engine()
111 { 111 {
112 while (true) 112 while (true)
113 { 113 {
114 // do stuff 114 // do stuff
115 } 115 }
116 } 116 }
117 117
118 } 118 }
119} 119}