aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces/IGridService.cs
diff options
context:
space:
mode:
authorDiva Canto2009-09-24 18:23:55 -0700
committerDiva Canto2009-09-24 18:23:55 -0700
commit6a5d7650d02979c74abcbbb3595729a4a6b55411 (patch)
tree85271d3382223cc9a851309dd707be127554da47 /OpenSim/Services/Interfaces/IGridService.cs
parentGridServerPostHandler finished. GridClient tests all work. More guards on get... (diff)
downloadopensim-SC-6a5d7650d02979c74abcbbb3595729a4a6b55411.zip
opensim-SC-6a5d7650d02979c74abcbbb3595729a4a6b55411.tar.gz
opensim-SC-6a5d7650d02979c74abcbbb3595729a4a6b55411.tar.bz2
opensim-SC-6a5d7650d02979c74abcbbb3595729a4a6b55411.tar.xz
All tests pass for MySQL/MySQLRegionData.
Added OpenSim.GridServer.ini.example that I have been using for testing the ROBUST grid service with the GridClient.
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs61
1 files changed, 18 insertions, 43 deletions
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 4bdcde2..513b1b0 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -263,72 +263,47 @@ 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["name"] = RegionName; 266 kvp["regionName"] = RegionName;
267 kvp["external_ip_address"] = ExternalEndPoint.Address.ToString(); 267 kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString();
268 kvp["external_port"] = ExternalEndPoint.Port.ToString(); 268 kvp["serverHttpPort"] = HttpPort.ToString();
269 kvp["external_host_name"] = ExternalHostName; 269 kvp["serverURI"] = ServerURI;
270 kvp["http_port"] = HttpPort.ToString();
271 kvp["internal_ip_address"] = InternalEndPoint.Address.ToString();
272 kvp["internal_port"] = InternalEndPoint.Port.ToString();
273 kvp["alternate_ports"] = m_allow_alternate_ports.ToString();
274 kvp["server_uri"] = ServerURI;
275 270
276 return kvp; 271 return kvp;
277 } 272 }
278 273
279 public GridRegion(Dictionary<string, object> kvp) 274 public GridRegion(Dictionary<string, object> kvp)
280 { 275 {
281 if (kvp["uuid"] != null) 276 if (kvp.ContainsKey("uuid"))
282 RegionID = new UUID((string)kvp["uuid"]); 277 RegionID = new UUID((string)kvp["uuid"]);
283 278
284 if (kvp["locX"] != null) 279 if (kvp.ContainsKey("locX"))
285 RegionLocX = Convert.ToInt32((string)kvp["locX"]); 280 RegionLocX = Convert.ToInt32((string)kvp["locX"]);
286 281
287 if (kvp["locY"] != null) 282 if (kvp.ContainsKey("locY"))
288 RegionLocY = Convert.ToInt32((string)kvp["locY"]); 283 RegionLocY = Convert.ToInt32((string)kvp["locY"]);
289 284
290 if (kvp["name"] != null) 285 if (kvp.ContainsKey("regionName"))
291 RegionName = (string)kvp["name"]; 286 RegionName = (string)kvp["regionName"];
292 287
293 if ((kvp["external_ip_address"] != null) && (kvp["external_port"] != null)) 288 if (kvp.ContainsKey("serverIP"))
294 { 289 {
295 int port = 0; 290 int port = 0;
296 Int32.TryParse((string)kvp["external_port"], out port); 291 //Int32.TryParse((string)kvp["serverPort"], out port);
297 IPEndPoint ep = new IPEndPoint(IPAddress.Parse((string)kvp["external_ip_address"]), port); 292 //IPEndPoint ep = new IPEndPoint(IPAddress.Parse((string)kvp["serverIP"]), port);
298 ExternalEndPoint = ep; 293 ExternalHostName = (string)kvp["serverIP"];
299 } 294 }
300 else 295 else
301 ExternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0); 296 ExternalHostName = "127.0.0.1";
302 297
303 if (kvp["external_host_name"] != null) 298 if (kvp.ContainsKey("serverHttpPort"))
304 ExternalHostName = (string)kvp["external_host_name"];
305
306 if (kvp["http_port"] != null)
307 { 299 {
308 UInt32 port = 0; 300 UInt32 port = 0;
309 UInt32.TryParse((string)kvp["http_port"], out port); 301 UInt32.TryParse((string)kvp["serverHttpPort"], out port);
310 HttpPort = port; 302 HttpPort = port;
311 } 303 }
312 304
313 if ((kvp["internal_ip_address"] != null) && (kvp["internal_port"] != null)) 305 if (kvp.ContainsKey("serverURI"))
314 { 306 ServerURI = (string)kvp["serverURI"];
315 int port = 0;
316 Int32.TryParse((string)kvp["internal_port"], out port);
317 IPEndPoint ep = new IPEndPoint(IPAddress.Parse((string)kvp["internal_ip_address"]), port);
318 InternalEndPoint = ep;
319 }
320 else
321 InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
322
323 if (kvp["alternate_ports"] != null)
324 {
325 bool alts = false;
326 Boolean.TryParse((string)kvp["alternate_ports"], out alts);
327 m_allow_alternate_ports = alts;
328 }
329
330 if (kvp["server_uri"] != null)
331 ServerURI = (string)kvp["server_uri"];
332 } 307 }
333 } 308 }
334 309