aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorDiva Canto2009-09-26 21:00:51 -0700
committerDiva Canto2009-09-26 21:00:51 -0700
commitf4bf581b96347b8d7f115eca74fa84a644eb729c (patch)
treec1e42376edb8d2e5a6094854dd1ac4320f0c6f23 /OpenSim/Framework/Util.cs
parentFixed a bug with link-region. (diff)
downloadopensim-SC_OLD-f4bf581b96347b8d7f115eca74fa84a644eb729c.zip
opensim-SC_OLD-f4bf581b96347b8d7f115eca74fa84a644eb729c.tar.gz
opensim-SC_OLD-f4bf581b96347b8d7f115eca74fa84a644eb729c.tar.bz2
opensim-SC_OLD-f4bf581b96347b8d7f115eca74fa84a644eb729c.tar.xz
Moved all HG1 operations to HGGridConnector.cs and HypergridServerConnector.cs/HypergridServiceConnector.cs, away from Region.Communications and HGNetworkServersInfo.
Fixed small bugs with hyperlinked regions' map positions.
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 45b5a10..a28a617 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1203,6 +1203,32 @@ namespace OpenSim.Framework
1203 return found.ToArray(); 1203 return found.ToArray();
1204 } 1204 }
1205 1205
1206 public static string ServerURI(string uri)
1207 {
1208 if (uri == string.Empty)
1209 return string.Empty;
1210
1211 // Get rid of eventual slashes at the end
1212 uri = uri.TrimEnd('/');
1213
1214 IPAddress ipaddr1 = null;
1215 string port1 = "";
1216 try
1217 {
1218 ipaddr1 = Util.GetHostFromURL(uri);
1219 }
1220 catch { }
1221
1222 try
1223 {
1224 port1 = uri.Split(new char[] { ':' })[2];
1225 }
1226 catch { }
1227
1228 // We tried our best to convert the domain names to IP addresses
1229 return (ipaddr1 != null) ? "http://" + ipaddr1.ToString() + ":" + port1 : uri;
1230 }
1231
1206 #region FireAndForget Threading Pattern 1232 #region FireAndForget Threading Pattern
1207 1233
1208 public static void FireAndForget(System.Threading.WaitCallback callback) 1234 public static void FireAndForget(System.Threading.WaitCallback callback)