aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces/IGridService.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs68
1 files changed, 32 insertions, 36 deletions
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index a188f7e..ce432ab 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -263,59 +263,55 @@ namespace OpenSim.Services.Interfaces
263 kvp["uuid"] = RegionID.ToString(); 263 kvp["uuid"] = RegionID.ToString();
264 kvp["locX"] = RegionLocX.ToString(); 264 kvp["locX"] = RegionLocX.ToString();
265 kvp["locY"] = RegionLocY.ToString(); 265 kvp["locY"] = RegionLocY.ToString();
266 kvp["external_ip_address"] = ExternalEndPoint.Address.ToString(); 266 kvp["regionName"] = RegionName;
267 kvp["external_port"] = ExternalEndPoint.Port.ToString(); 267 kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString();
268 kvp["external_host_name"] = ExternalHostName; 268 kvp["serverHttpPort"] = HttpPort.ToString();
269 kvp["http_port"] = HttpPort.ToString(); 269 kvp["serverURI"] = ServerURI;
270 kvp["internal_ip_address"] = InternalEndPoint.Address.ToString(); 270 kvp["serverPort"] = InternalEndPoint.Port.ToString();
271 kvp["internal_port"] = InternalEndPoint.Port.ToString();
272 kvp["alternate_ports"] = m_allow_alternate_ports.ToString();
273 kvp["server_uri"] = ServerURI;
274 271
275 return kvp; 272 return kvp;
276 } 273 }
277 274
278 public GridRegion(Dictionary<string, object> kvp) 275 public GridRegion(Dictionary<string, object> kvp)
279 { 276 {
280 if ((kvp["external_ip_address"] != null) && (kvp["external_port"] != null)) 277 if (kvp.ContainsKey("uuid"))
281 { 278 RegionID = new UUID((string)kvp["uuid"]);
282 int port = 0;
283 Int32.TryParse((string)kvp["external_port"], out port);
284 IPEndPoint ep = new IPEndPoint(IPAddress.Parse((string)kvp["external_ip_address"]), port);
285 ExternalEndPoint = ep;
286 }
287 else
288 ExternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
289 279
290 if (kvp["external_host_name"] != null) 280 if (kvp.ContainsKey("locX"))
291 ExternalHostName = (string)kvp["external_host_name"]; 281 RegionLocX = Convert.ToInt32((string)kvp["locX"]);
292 282
293 if (kvp["http_port"] != null) 283 if (kvp.ContainsKey("locY"))
284 RegionLocY = Convert.ToInt32((string)kvp["locY"]);
285
286 if (kvp.ContainsKey("regionName"))
287 RegionName = (string)kvp["regionName"];
288
289 if (kvp.ContainsKey("serverIP"))
294 { 290 {
295 UInt32 port = 0; 291 //int port = 0;
296 UInt32.TryParse((string)kvp["http_port"], out port); 292 //Int32.TryParse((string)kvp["serverPort"], out port);
297 HttpPort = port; 293 //IPEndPoint ep = new IPEndPoint(IPAddress.Parse((string)kvp["serverIP"]), port);
294 ExternalHostName = (string)kvp["serverIP"];
298 } 295 }
296 else
297 ExternalHostName = "127.0.0.1";
299 298
300 if ((kvp["internal_ip_address"] != null) && (kvp["internal_port"] != null)) 299 if (kvp.ContainsKey("serverPort"))
301 { 300 {
302 int port = 0; 301 Int32 port = 0;
303 Int32.TryParse((string)kvp["internal_port"], out port); 302 Int32.TryParse((string)kvp["serverPort"], out port);
304 IPEndPoint ep = new IPEndPoint(IPAddress.Parse((string)kvp["internal_ip_address"]), port); 303 InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port);
305 InternalEndPoint = ep;
306 } 304 }
307 else
308 InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
309 305
310 if (kvp["alternate_ports"] != null) 306 if (kvp.ContainsKey("serverHttpPort"))
311 { 307 {
312 bool alts = false; 308 UInt32 port = 0;
313 Boolean.TryParse((string)kvp["alternate_ports"], out alts); 309 UInt32.TryParse((string)kvp["serverHttpPort"], out port);
314 m_allow_alternate_ports = alts; 310 HttpPort = port;
315 } 311 }
316 312
317 if (kvp["server_uri"] != null) 313 if (kvp.ContainsKey("serverURI"))
318 ServerURI = (string)kvp["server_uri"]; 314 ServerURI = (string)kvp["serverURI"];
319 } 315 }
320 } 316 }
321 317