aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorOren Hurvitz2014-04-03 12:47:20 +0300
committerOren Hurvitz2014-04-03 14:13:03 +0100
commit6d2893be67fd725090b69f5f31c0985c3d211135 (patch)
tree6dd6ff48ed74f751730930635638b3a54fce4b7f /OpenSim/Services
parentBulletSim: make avatar physical shape to be a rectangle rather than (diff)
downloadopensim-SC_OLD-6d2893be67fd725090b69f5f31c0985c3d211135.zip
opensim-SC_OLD-6d2893be67fd725090b69f5f31c0985c3d211135.tar.gz
opensim-SC_OLD-6d2893be67fd725090b69f5f31c0985c3d211135.tar.bz2
opensim-SC_OLD-6d2893be67fd725090b69f5f31c0985c3d211135.tar.xz
When teleporting using Hypergrid, show more informative error messages in case of error
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs13
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs13
-rw-r--r--OpenSim/Services/Interfaces/IHypergridServices.cs2
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs3
4 files changed, 27 insertions, 4 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 5d7dcfd..8b1cc27 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -202,7 +202,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
202 return mapTile; 202 return mapTile;
203 } 203 }
204 204
205 public GridRegion GetHyperlinkRegion(GridRegion gatekeeper, UUID regionID) 205 public GridRegion GetHyperlinkRegion(GridRegion gatekeeper, UUID regionID, out string message)
206 { 206 {
207 Hashtable hash = new Hashtable(); 207 Hashtable hash = new Hashtable();
208 hash["region_uuid"] = regionID.ToString(); 208 hash["region_uuid"] = regionID.ToString();
@@ -219,12 +219,14 @@ namespace OpenSim.Services.Connectors.Hypergrid
219 } 219 }
220 catch (Exception e) 220 catch (Exception e)
221 { 221 {
222 message = "Error contacting grid.";
222 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Exception " + e.Message); 223 m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Exception " + e.Message);
223 return null; 224 return null;
224 } 225 }
225 226
226 if (response.IsFault) 227 if (response.IsFault)
227 { 228 {
229 message = "Error contacting grid.";
228 m_log.ErrorFormat("[GATEKEEPER SERVICE CONNECTOR]: remote call returned an error: {0}", response.FaultString); 230 m_log.ErrorFormat("[GATEKEEPER SERVICE CONNECTOR]: remote call returned an error: {0}", response.FaultString);
229 return null; 231 return null;
230 } 232 }
@@ -236,6 +238,14 @@ namespace OpenSim.Services.Connectors.Hypergrid
236 { 238 {
237 bool success = false; 239 bool success = false;
238 Boolean.TryParse((string)hash["result"], out success); 240 Boolean.TryParse((string)hash["result"], out success);
241
242 if (hash["message"] != null)
243 message = (string)hash["message"];
244 else if (success)
245 message = null;
246 else
247 message = "The teleport destination could not be found."; // probably the dest grid is old and doesn't send 'message', but the most common problem is that the region is unavailable
248
239 if (success) 249 if (success)
240 { 250 {
241 GridRegion region = new GridRegion(); 251 GridRegion region = new GridRegion();
@@ -305,6 +315,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
305 } 315 }
306 catch (Exception e) 316 catch (Exception e)
307 { 317 {
318 message = "Error parsing response from grid.";
308 m_log.Error("[GATEKEEPER SERVICE CONNECTOR]: Got exception while parsing hyperlink response " + e.StackTrace); 319 m_log.Error("[GATEKEEPER SERVICE CONNECTOR]: Got exception while parsing hyperlink response " + e.StackTrace);
309 return null; 320 return null;
310 } 321 }
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 7a0228b..e9d41c7 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -204,15 +204,26 @@ namespace OpenSim.Services.HypergridService
204 return true; 204 return true;
205 } 205 }
206 206
207 public GridRegion GetHyperlinkRegion(UUID regionID) 207 public GridRegion GetHyperlinkRegion(UUID regionID, out string message)
208 { 208 {
209 m_log.DebugFormat("[GATEKEEPER SERVICE]: Request to get hyperlink region {0}", regionID); 209 m_log.DebugFormat("[GATEKEEPER SERVICE]: Request to get hyperlink region {0}", regionID);
210 message = null;
210 211
211 if (!m_AllowTeleportsToAnyRegion) 212 if (!m_AllowTeleportsToAnyRegion)
213 {
212 // Don't even check the given regionID 214 // Don't even check the given regionID
215 message = "Teleporting to the default region.";
213 return m_DefaultGatewayRegion; 216 return m_DefaultGatewayRegion;
217 }
214 218
215 GridRegion region = m_GridService.GetRegionByUUID(m_ScopeID, regionID); 219 GridRegion region = m_GridService.GetRegionByUUID(m_ScopeID, regionID);
220
221 if (region == null)
222 {
223 message = "The teleport destination could not be found.";
224 return null;
225 }
226
216 return region; 227 return region;
217 } 228 }
218 229
diff --git a/OpenSim/Services/Interfaces/IHypergridServices.cs b/OpenSim/Services/Interfaces/IHypergridServices.cs
index bece4c7..a846bad 100644
--- a/OpenSim/Services/Interfaces/IHypergridServices.cs
+++ b/OpenSim/Services/Interfaces/IHypergridServices.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Services.Interfaces
37 public interface IGatekeeperService 37 public interface IGatekeeperService
38 { 38 {
39 bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason); 39 bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason);
40 GridRegion GetHyperlinkRegion(UUID regionID); 40 GridRegion GetHyperlinkRegion(UUID regionID, out string message);
41 41
42 bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason); 42 bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason);
43 43
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index b61b5e8..6d6e3d6 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -750,9 +750,10 @@ namespace OpenSim.Services.LLLoginService
750 UUID regionID; 750 UUID regionID;
751 ulong handle; 751 ulong handle;
752 string imageURL = string.Empty, reason = string.Empty; 752 string imageURL = string.Empty, reason = string.Empty;
753 string message;
753 if (m_GatekeeperConnector.LinkRegion(gatekeeper, out regionID, out handle, out domainName, out imageURL, out reason)) 754 if (m_GatekeeperConnector.LinkRegion(gatekeeper, out regionID, out handle, out domainName, out imageURL, out reason))
754 { 755 {
755 GridRegion destination = m_GatekeeperConnector.GetHyperlinkRegion(gatekeeper, regionID); 756 GridRegion destination = m_GatekeeperConnector.GetHyperlinkRegion(gatekeeper, regionID, out message);
756 return destination; 757 return destination;
757 } 758 }
758 759