diff options
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 05b00e5..42ea296 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |||
@@ -184,7 +184,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
184 | resp["reason"] = OSD.FromString(reason); | 184 | resp["reason"] = OSD.FromString(reason); |
185 | resp["success"] = OSD.FromBoolean(result); | 185 | resp["success"] = OSD.FromBoolean(result); |
186 | // Let's also send out the IP address of the caller back to the caller (HG 1.5) | 186 | // Let's also send out the IP address of the caller back to the caller (HG 1.5) |
187 | resp["your_ip"] = OSD.FromString(GetCallerIP(request)); | 187 | resp["your_ip"] = OSD.FromString(Util.GetCallerIP(request)); |
188 | 188 | ||
189 | // TODO: add reason if not String.Empty? | 189 | // TODO: add reason if not String.Empty? |
190 | responsedata["int_response_code"] = HttpStatusCode.OK; | 190 | responsedata["int_response_code"] = HttpStatusCode.OK; |
@@ -378,23 +378,6 @@ namespace OpenSim.Server.Handlers.Simulation | |||
378 | m_SimulationService.ReleaseAgent(regionID, id, ""); | 378 | m_SimulationService.ReleaseAgent(regionID, id, ""); |
379 | } | 379 | } |
380 | 380 | ||
381 | private string GetCallerIP(Hashtable req) | ||
382 | { | ||
383 | if (req.ContainsKey("headers")) | ||
384 | { | ||
385 | try | ||
386 | { | ||
387 | Hashtable headers = (Hashtable)req["headers"]; | ||
388 | if (headers.ContainsKey("remote_addr") && headers["remote_addr"] != null) | ||
389 | return headers["remote_addr"].ToString(); | ||
390 | } | ||
391 | catch (Exception e) | ||
392 | { | ||
393 | m_log.WarnFormat("[AGENT HANDLER]: exception in GetCallerIP: {0}", e.Message); | ||
394 | } | ||
395 | } | ||
396 | return string.Empty; | ||
397 | } | ||
398 | } | 381 | } |
399 | 382 | ||
400 | } | 383 | } |