aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorDiva Canto2010-09-04 16:39:03 -0700
committerDiva Canto2010-09-04 16:39:03 -0700
commit9fd98368416ce9514e0926301a1fc20648d9ad59 (patch)
tree1d548f5311c51ad3dc5095232e87a45ef71c98b0 /OpenSim/Framework/Util.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-9fd98368416ce9514e0926301a1fc20648d9ad59.zip
opensim-SC_OLD-9fd98368416ce9514e0926301a1fc20648d9ad59.tar.gz
opensim-SC_OLD-9fd98368416ce9514e0926301a1fc20648d9ad59.tar.bz2
opensim-SC_OLD-9fd98368416ce9514e0926301a1fc20648d9ad59.tar.xz
Make User Agent Service and Login Service separable.
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 2ac4eb1..e7a7f49 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1521,7 +1521,23 @@ namespace OpenSim.Framework
1521 return null; 1521 return null;
1522 } 1522 }
1523 1523
1524 1524 public static string GetCallerIP(Hashtable req)
1525 {
1526 if (req.ContainsKey("headers"))
1527 {
1528 try
1529 {
1530 Hashtable headers = (Hashtable)req["headers"];
1531 if (headers.ContainsKey("remote_addr") && headers["remote_addr"] != null)
1532 return headers["remote_addr"].ToString();
1533 }
1534 catch (Exception e)
1535 {
1536 m_log.WarnFormat("[UTIL]: exception in GetCallerIP: {0}", e.Message);
1537 }
1538 }
1539 return string.Empty;
1540 }
1525 1541
1526 } 1542 }
1527} 1543}