diff options
author | Diva Canto | 2010-09-04 16:39:03 -0700 |
---|---|---|
committer | Diva Canto | 2010-09-04 16:39:03 -0700 |
commit | 9fd98368416ce9514e0926301a1fc20648d9ad59 (patch) | |
tree | 1d548f5311c51ad3dc5095232e87a45ef71c98b0 /OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-9fd98368416ce9514e0926301a1fc20648d9ad59.zip opensim-SC-9fd98368416ce9514e0926301a1fc20648d9ad59.tar.gz opensim-SC-9fd98368416ce9514e0926301a1fc20648d9ad59.tar.bz2 opensim-SC-9fd98368416ce9514e0926301a1fc20648d9ad59.tar.xz |
Make User Agent Service and Login Service separable.
Diffstat (limited to 'OpenSim/Server/Handlers/Simulation/AgentHandlers.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 392927a..2997430 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |||
@@ -179,7 +179,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
179 | resp["reason"] = OSD.FromString(reason); | 179 | resp["reason"] = OSD.FromString(reason); |
180 | resp["success"] = OSD.FromBoolean(result); | 180 | resp["success"] = OSD.FromBoolean(result); |
181 | // Let's also send out the IP address of the caller back to the caller (HG 1.5) | 181 | // Let's also send out the IP address of the caller back to the caller (HG 1.5) |
182 | resp["your_ip"] = OSD.FromString(GetCallerIP(request)); | 182 | resp["your_ip"] = OSD.FromString(Util.GetCallerIP(request)); |
183 | 183 | ||
184 | // TODO: add reason if not String.Empty? | 184 | // TODO: add reason if not String.Empty? |
185 | responsedata["int_response_code"] = HttpStatusCode.OK; | 185 | responsedata["int_response_code"] = HttpStatusCode.OK; |
@@ -355,23 +355,6 @@ namespace OpenSim.Server.Handlers.Simulation | |||
355 | m_SimulationService.ReleaseAgent(regionID, id, ""); | 355 | m_SimulationService.ReleaseAgent(regionID, id, ""); |
356 | } | 356 | } |
357 | 357 | ||
358 | private string GetCallerIP(Hashtable req) | ||
359 | { | ||
360 | if (req.ContainsKey("headers")) | ||
361 | { | ||
362 | try | ||
363 | { | ||
364 | Hashtable headers = (Hashtable)req["headers"]; | ||
365 | if (headers.ContainsKey("remote_addr") && headers["remote_addr"] != null) | ||
366 | return headers["remote_addr"].ToString(); | ||
367 | } | ||
368 | catch (Exception e) | ||
369 | { | ||
370 | m_log.WarnFormat("[AGENT HANDLER]: exception in GetCallerIP: {0}", e.Message); | ||
371 | } | ||
372 | } | ||
373 | return string.Empty; | ||
374 | } | ||
375 | } | 358 | } |
376 | 359 | ||
377 | } | 360 | } |