aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
authorBlueWall2011-01-27 08:53:57 -0500
committerBlueWall2011-01-27 08:53:57 -0500
commitd89d9d1b1310d494fbb7712057eab8a196e10a04 (patch)
tree62834b7f5954aa8f013a159ee2fc3ccee385e673 /OpenSim/Server
parentMake FireAndForgetWrapper a singleton class (diff)
parentMake it work (diff)
downloadopensim-SC_OLD-d89d9d1b1310d494fbb7712057eab8a196e10a04.zip
opensim-SC_OLD-d89d9d1b1310d494fbb7712057eab8a196e10a04.tar.gz
opensim-SC_OLD-d89d9d1b1310d494fbb7712057eab8a196e10a04.tar.bz2
opensim-SC_OLD-d89d9d1b1310d494fbb7712057eab8a196e10a04.tar.xz
Merge branch 'master' of /home/opensim/src/OpenSim/Core
Diffstat (limited to 'OpenSim/Server')
-rw-r--r--OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs3
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs6
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs19
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs6
-rw-r--r--OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs9
-rw-r--r--OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs19
-rw-r--r--OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs2
9 files changed, 36 insertions, 32 deletions
diff --git a/OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs b/OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs
index c9e80d9..8472d34 100644
--- a/OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs
+++ b/OpenSim/Server/Handlers/Grid/GridInfoServerInConnector.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Server.Handlers.Grid
39{ 39{
40 public class GridInfoServerInConnector : ServiceConnector 40 public class GridInfoServerInConnector : ServiceConnector
41 { 41 {
42 private string m_ConfigName = "GridInfoService"; 42// private string m_ConfigName = "GridInfoService";
43 43
44 public GridInfoServerInConnector(IConfigSource config, IHttpServer server, string configName) : 44 public GridInfoServerInConnector(IConfigSource config, IHttpServer server, string configName) :
45 base(config, server, configName) 45 base(config, server, configName)
diff --git a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs
index 31eefb1..f3f81b0 100644
--- a/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/AgentHandlers.cs
@@ -51,7 +51,8 @@ namespace OpenSim.Server.Handlers.Hypergrid
51{ 51{
52 public class GatekeeperAgentHandler : OpenSim.Server.Handlers.Simulation.AgentHandler 52 public class GatekeeperAgentHandler : OpenSim.Server.Handlers.Simulation.AgentHandler
53 { 53 {
54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55
55 private IGatekeeperService m_GatekeeperService; 56 private IGatekeeperService m_GatekeeperService;
56 57
57 public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy) 58 public GatekeeperAgentHandler(IGatekeeperService gatekeeper, bool proxy)
diff --git a/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs
index 49de8b1..3d0967f 100644
--- a/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs
@@ -41,9 +41,9 @@ namespace OpenSim.Server.Handlers.Hypergrid
41{ 41{
42 public class GatekeeperServiceInConnector : ServiceConnector 42 public class GatekeeperServiceInConnector : ServiceConnector
43 { 43 {
44 private static readonly ILog m_log = 44// private static readonly ILog m_log =
45 LogManager.GetLogger( 45// LogManager.GetLogger(
46 MethodBase.GetCurrentMethod().DeclaringType); 46// MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 private IGatekeeperService m_GatekeeperService; 48 private IGatekeeperService m_GatekeeperService;
49 public IGatekeeperService GateKeeper 49 public IGatekeeperService GateKeeper
diff --git a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs
index 0066bd4..968c1e6 100644
--- a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs
@@ -215,15 +215,22 @@ namespace OpenSim.Server.Handlers.Hypergrid
215 215
216 // We're behind a proxy 216 // We're behind a proxy
217 Hashtable headers = (Hashtable)request["headers"]; 217 Hashtable headers = (Hashtable)request["headers"];
218 if (headers.ContainsKey("X-Forwarded-For") && headers["X-Forwarded-For"] != null) 218 string xff = "X-Forwarded-For";
219 { 219 if (headers.ContainsKey(xff.ToLower()))
220 m_log.DebugFormat("[HOME AGENT HANDLER]: XFF is {0}", headers["X-Forwarded-For"]); 220 xff = xff.ToLower();
221 221
222 IPEndPoint ep = Util.GetClientIPFromXFF((string)headers["X-Forwarded-For"]); 222 if (!headers.ContainsKey(xff) || headers[xff] == null)
223 if (ep != null) 223 {
224 return ep.Address.ToString(); 224 m_log.WarnFormat("[AGENT HANDLER]: No XFF header");
225 return Util.GetCallerIP(request);
225 } 226 }
226 227
228 m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers[xff]);
229
230 IPEndPoint ep = Util.GetClientIPFromXFF((string)headers[xff]);
231 if (ep != null)
232 return ep.Address.ToString();
233
227 // Oops 234 // Oops
228 return Util.GetCallerIP(request); 235 return Util.GetCallerIP(request);
229 } 236 }
diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
index e5f6a5d..0e8ce80 100644
--- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
@@ -47,9 +47,9 @@ namespace OpenSim.Server.Handlers.Hypergrid
47{ 47{
48 public class UserAgentServerConnector : ServiceConnector 48 public class UserAgentServerConnector : ServiceConnector
49 { 49 {
50 private static readonly ILog m_log = 50// private static readonly ILog m_log =
51 LogManager.GetLogger( 51// LogManager.GetLogger(
52 MethodBase.GetCurrentMethod().DeclaringType); 52// MethodBase.GetCurrentMethod().DeclaringType);
53 53
54 private IUserAgentService m_HomeUsersService; 54 private IUserAgentService m_HomeUsersService;
55 55
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
index 00f035c..899f9c0 100644
--- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
@@ -347,7 +347,6 @@ namespace OpenSim.Server.Handlers.Asset
347 347
348 byte[] HandleAddFolder(Dictionary<string,object> request) 348 byte[] HandleAddFolder(Dictionary<string,object> request)
349 { 349 {
350 Dictionary<string,object> result = new Dictionary<string,object>();
351 InventoryFolderBase folder = BuildFolder(request); 350 InventoryFolderBase folder = BuildFolder(request);
352 351
353 if (m_InventoryService.AddFolder(folder)) 352 if (m_InventoryService.AddFolder(folder))
@@ -358,7 +357,6 @@ namespace OpenSim.Server.Handlers.Asset
358 357
359 byte[] HandleUpdateFolder(Dictionary<string,object> request) 358 byte[] HandleUpdateFolder(Dictionary<string,object> request)
360 { 359 {
361 Dictionary<string, object> result = new Dictionary<string, object>();
362 InventoryFolderBase folder = BuildFolder(request); 360 InventoryFolderBase folder = BuildFolder(request);
363 361
364 if (m_InventoryService.UpdateFolder(folder)) 362 if (m_InventoryService.UpdateFolder(folder))
@@ -369,7 +367,6 @@ namespace OpenSim.Server.Handlers.Asset
369 367
370 byte[] HandleMoveFolder(Dictionary<string,object> request) 368 byte[] HandleMoveFolder(Dictionary<string,object> request)
371 { 369 {
372 Dictionary<string, object> result = new Dictionary<string, object>();
373 UUID parentID = UUID.Zero; 370 UUID parentID = UUID.Zero;
374 UUID.TryParse(request["ParentID"].ToString(), out parentID); 371 UUID.TryParse(request["ParentID"].ToString(), out parentID);
375 UUID folderID = UUID.Zero; 372 UUID folderID = UUID.Zero;
@@ -387,7 +384,6 @@ namespace OpenSim.Server.Handlers.Asset
387 384
388 byte[] HandleDeleteFolders(Dictionary<string,object> request) 385 byte[] HandleDeleteFolders(Dictionary<string,object> request)
389 { 386 {
390 Dictionary<string,object> result = new Dictionary<string,object>();
391 UUID principal = UUID.Zero; 387 UUID principal = UUID.Zero;
392 UUID.TryParse(request["PRINCIPAL"].ToString(), out principal); 388 UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
393 List<string> slist = (List<string>)request["FOLDERS"]; 389 List<string> slist = (List<string>)request["FOLDERS"];
@@ -408,7 +404,6 @@ namespace OpenSim.Server.Handlers.Asset
408 404
409 byte[] HandlePurgeFolder(Dictionary<string,object> request) 405 byte[] HandlePurgeFolder(Dictionary<string,object> request)
410 { 406 {
411 Dictionary<string,object> result = new Dictionary<string,object>();
412 UUID folderID = UUID.Zero; 407 UUID folderID = UUID.Zero;
413 UUID.TryParse(request["ID"].ToString(), out folderID); 408 UUID.TryParse(request["ID"].ToString(), out folderID);
414 409
@@ -421,7 +416,6 @@ namespace OpenSim.Server.Handlers.Asset
421 416
422 byte[] HandleAddItem(Dictionary<string,object> request) 417 byte[] HandleAddItem(Dictionary<string,object> request)
423 { 418 {
424 Dictionary<string, object> result = new Dictionary<string, object>();
425 InventoryItemBase item = BuildItem(request); 419 InventoryItemBase item = BuildItem(request);
426 420
427 if (m_InventoryService.AddItem(item)) 421 if (m_InventoryService.AddItem(item))
@@ -432,7 +426,6 @@ namespace OpenSim.Server.Handlers.Asset
432 426
433 byte[] HandleUpdateItem(Dictionary<string,object> request) 427 byte[] HandleUpdateItem(Dictionary<string,object> request)
434 { 428 {
435 Dictionary<string, object> result = new Dictionary<string, object>();
436 InventoryItemBase item = BuildItem(request); 429 InventoryItemBase item = BuildItem(request);
437 430
438 if (m_InventoryService.UpdateItem(item)) 431 if (m_InventoryService.UpdateItem(item))
@@ -443,7 +436,6 @@ namespace OpenSim.Server.Handlers.Asset
443 436
444 byte[] HandleMoveItems(Dictionary<string,object> request) 437 byte[] HandleMoveItems(Dictionary<string,object> request)
445 { 438 {
446 Dictionary<string,object> result = new Dictionary<string,object>();
447 List<string> idlist = (List<string>)request["IDLIST"]; 439 List<string> idlist = (List<string>)request["IDLIST"];
448 List<string> destlist = (List<string>)request["DESTLIST"]; 440 List<string> destlist = (List<string>)request["DESTLIST"];
449 UUID principal = UUID.Zero; 441 UUID principal = UUID.Zero;
@@ -482,7 +474,6 @@ namespace OpenSim.Server.Handlers.Asset
482 474
483 byte[] HandleDeleteItems(Dictionary<string,object> request) 475 byte[] HandleDeleteItems(Dictionary<string,object> request)
484 { 476 {
485 Dictionary<string, object> result = new Dictionary<string, object>();
486 UUID principal = UUID.Zero; 477 UUID principal = UUID.Zero;
487 UUID.TryParse(request["PRINCIPAL"].ToString(), out principal); 478 UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
488 List<string> slist = (List<string>)request["ITEMS"]; 479 List<string> slist = (List<string>)request["ITEMS"];
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
index 3104917..85bf96e 100644
--- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
@@ -129,8 +129,6 @@ namespace OpenSim.Server.Handlers.Presence
129 byte[] LogoutAgent(Dictionary<string, object> request) 129 byte[] LogoutAgent(Dictionary<string, object> request)
130 { 130 {
131 UUID session = UUID.Zero; 131 UUID session = UUID.Zero;
132 Vector3 position = Vector3.Zero;
133 Vector3 lookat = Vector3.Zero;
134 132
135 if (!request.ContainsKey("SessionID")) 133 if (!request.ContainsKey("SessionID"))
136 return FailureResult(); 134 return FailureResult();
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 9c41bcb..57672a8 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -200,15 +200,22 @@ namespace OpenSim.Server.Handlers.Simulation
200 200
201 // We're behind a proxy 201 // We're behind a proxy
202 Hashtable headers = (Hashtable)request["headers"]; 202 Hashtable headers = (Hashtable)request["headers"];
203 if (headers.ContainsKey("X-Forwarded-For") && headers["X-Forwarded-For"] != null) 203 string xff = "X-Forwarded-For";
204 { 204 if (headers.ContainsKey(xff.ToLower()))
205 m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers["X-Forwarded-For"]); 205 xff = xff.ToLower();
206 206
207 IPEndPoint ep = Util.GetClientIPFromXFF((string)headers["X-Forwarded-For"]); 207 if (!headers.ContainsKey(xff) || headers[xff] == null)
208 if (ep != null) 208 {
209 return ep.Address.ToString(); 209 m_log.WarnFormat("[AGENT HANDLER]: No XFF header");
210 return Util.GetCallerIP(request);
210 } 211 }
211 212
213 m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers[xff]);
214
215 IPEndPoint ep = Util.GetClientIPFromXFF((string)headers[xff]);
216 if (ep != null)
217 return ep.Address.ToString();
218
212 // Oops 219 // Oops
213 return Util.GetCallerIP(request); 220 return Util.GetCallerIP(request);
214 } 221 }
diff --git a/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs b/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs
index 50d6fb2..f33eda7 100644
--- a/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs
+++ b/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Server.Handlers.Simulation
38 public class SimulationServiceInConnector : ServiceConnector 38 public class SimulationServiceInConnector : ServiceConnector
39 { 39 {
40 private ISimulationService m_LocalSimulationService; 40 private ISimulationService m_LocalSimulationService;
41 private IAuthenticationService m_AuthenticationService; 41// private IAuthenticationService m_AuthenticationService;
42 42
43 public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) : 43 public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) :
44 base(config, server, String.Empty) 44 base(config, server, String.Empty)