aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs21
1 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index b031f21..f8eebbe 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -28,6 +28,8 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Collections.Specialized; 30using System.Collections.Specialized;
31using System.Drawing;
32using System.Drawing.Imaging;
31using System.IO; 33using System.IO;
32using System.Net; 34using System.Net;
33using System.Reflection; 35using System.Reflection;
@@ -89,7 +91,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
89 m_log.Error("[SIMIAN GRID CONNECTOR]: No Server URI named in section GridService"); 91 m_log.Error("[SIMIAN GRID CONNECTOR]: No Server URI named in section GridService");
90 throw new Exception("Grid connector init error"); 92 throw new Exception("Grid connector init error");
91 } 93 }
92 94
93 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) 95 if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("="))
94 serviceUrl = serviceUrl + '/'; 96 serviceUrl = serviceUrl + '/';
95 m_ServerURI = serviceUrl; 97 m_ServerURI = serviceUrl;
@@ -100,6 +102,15 @@ namespace OpenSim.Services.Connectors.SimianGrid
100 102
101 public string RegisterRegion(UUID scopeID, GridRegion regionInfo) 103 public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
102 { 104 {
105 IPEndPoint ext = regionInfo.ExternalEndPoint;
106 if (ext == null) return "Region registration for " + regionInfo.RegionName + " failed: Could not resolve EndPoint";
107 // Generate and upload our map tile in PNG format to the SimianGrid AddMapTile service
108// Scene scene;
109// if (m_scenes.TryGetValue(regionInfo.RegionID, out scene))
110// UploadMapTile(scene);
111// else
112// m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking");
113
103 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); 114 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
104 Vector3d maxPosition = minPosition + new Vector3d(regionInfo.RegionSizeX, regionInfo.RegionSizeY, Constants.RegionHeight); 115 Vector3d maxPosition = minPosition + new Vector3d(regionInfo.RegionSizeX, regionInfo.RegionSizeY, Constants.RegionHeight);
105 116
@@ -108,7 +119,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
108 { "ServerURI", OSD.FromString(regionInfo.ServerURI) }, 119 { "ServerURI", OSD.FromString(regionInfo.ServerURI) },
109 { "InternalAddress", OSD.FromString(regionInfo.InternalEndPoint.Address.ToString()) }, 120 { "InternalAddress", OSD.FromString(regionInfo.InternalEndPoint.Address.ToString()) },
110 { "InternalPort", OSD.FromInteger(regionInfo.InternalEndPoint.Port) }, 121 { "InternalPort", OSD.FromInteger(regionInfo.InternalEndPoint.Port) },
111 { "ExternalAddress", OSD.FromString(regionInfo.ExternalEndPoint.Address.ToString()) }, 122 { "ExternalAddress", OSD.FromString(ext.Address.ToString()) },
112 { "ExternalPort", OSD.FromInteger(regionInfo.ExternalEndPoint.Port) }, 123 { "ExternalPort", OSD.FromInteger(regionInfo.ExternalEndPoint.Port) },
113 { "MapTexture", OSD.FromUUID(regionInfo.TerrainImage) }, 124 { "MapTexture", OSD.FromUUID(regionInfo.TerrainImage) },
114 { "Access", OSD.FromInteger(regionInfo.Access) }, 125 { "Access", OSD.FromInteger(regionInfo.Access) },
@@ -219,7 +230,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
219 }; 230 };
220 231
221 // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request grid at {0}",position.ToString()); 232 // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request grid at {0}",position.ToString());
222 233
223 OSDMap response = SimianGrid.PostToService(m_ServerURI, requestArgs); 234 OSDMap response = SimianGrid.PostToService(m_ServerURI, requestArgs);
224 if (response["Success"].AsBoolean()) 235 if (response["Success"].AsBoolean())
225 { 236 {
@@ -297,7 +308,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
297 }; 308 };
298 309
299 //m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request regions by range {0} to {1}",minPosition.ToString(),maxPosition.ToString()); 310 //m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request regions by range {0} to {1}",minPosition.ToString(),maxPosition.ToString());
300 311
301 312
302 OSDMap response = SimianGrid.PostToService(m_ServerURI, requestArgs); 313 OSDMap response = SimianGrid.PostToService(m_ServerURI, requestArgs);
303 if (response["Success"].AsBoolean()) 314 if (response["Success"].AsBoolean())
@@ -402,7 +413,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
402 return -1; 413 return -1;
403 } 414 }
404 } 415 }
405 416
406 public Dictionary<string, object> GetExtraFeatures() 417 public Dictionary<string, object> GetExtraFeatures()
407 { 418 {
408 /// See SimulatorFeaturesModule - Need to get map, search and destination guide 419 /// See SimulatorFeaturesModule - Need to get map, search and destination guide