aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs14
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs15
-rw-r--r--OpenSim/Framework/Servers/OSHttpRequestPump.cs2
-rw-r--r--OpenSim/Framework/Servers/OSHttpServer.cs12
4 files changed, 24 insertions, 19 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index cc64e6c..e8353b4 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -255,28 +255,28 @@ namespace OpenSim.Framework.Communications
255 remote_client.SendNameReply(uuid, names[0], names[1]); 255 remote_client.SendNameReply(uuid, names[0], names[1]);
256 } 256 }
257 257
258 } 258 }
259 } 259 }
260 260
261 private string[] doUUIDNameRequest(LLUUID uuid) 261 private string[] doUUIDNameRequest(LLUUID uuid)
262 { 262 {
263 string[] returnstring = new string[0]; 263 string[] returnstring = new string[0];
264 bool doLookup = false; 264 bool doLookup = false;
265 265
266 266
267 lock (m_nameRequestCache) 267 lock (m_nameRequestCache)
268 { 268 {
269 if (m_nameRequestCache.ContainsKey(uuid)) 269 if (m_nameRequestCache.ContainsKey(uuid))
270 { 270 {
271 returnstring = m_nameRequestCache[uuid]; 271 returnstring = m_nameRequestCache[uuid];
272 } 272 }
273 else 273 else
274 { 274 {
275 // we don't want to lock the dictionary while we're doing the lookup 275 // we don't want to lock the dictionary while we're doing the lookup
276 doLookup = true; 276 doLookup = true;
277 } 277 }
278 } 278 }
279 279
280 if (doLookup) { 280 if (doLookup) {
281 UserProfileData profileData = m_userService.GetUserProfile(uuid); 281 UserProfileData profileData = m_userService.GetUserProfile(uuid);
282 if (profileData != null) 282 if (profileData != null)
@@ -293,7 +293,7 @@ namespace OpenSim.Framework.Communications
293 } 293 }
294 } 294 }
295 return returnstring; 295 return returnstring;
296 296
297 } 297 }
298 298
299 public bool UUIDNameCachedTest(LLUUID uuid) 299 public bool UUIDNameCachedTest(LLUUID uuid)
@@ -311,7 +311,7 @@ namespace OpenSim.Framework.Communications
311 string lastname = names[1]; 311 string lastname = names[1];
312 312
313 return firstname + " " + lastname; 313 return firstname + " " + lastname;
314 314
315 } 315 }
316 return "(hippos)"; 316 return "(hippos)";
317 } 317 }
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}