From a208f33c5dc4784f97dc3cd46cb56e79cc457f82 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 5 Oct 2009 00:23:47 +0100 Subject: Make the asset connector async Get overload return false if the asset retrieval was not synchronous. --- OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs index b1d41da..6f7c90f 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs @@ -171,6 +171,8 @@ namespace OpenSim.Services.Connectors if (asset == null) { + bool result = false; + AsynchronousRestObjectRequester. MakeRequest("GET", uri, 0, delegate(AssetBase a) @@ -178,8 +180,10 @@ namespace OpenSim.Services.Connectors if (m_Cache != null) m_Cache.Cache(a); handler(id, sender, a); + result = true; }); + return result; } else { -- cgit v1.1 From a2d5da71292ee271617edf28346e6aeb1e153943 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Oct 2009 10:31:09 -0700 Subject: More debug messages if things go wrong. --- OpenSim/Services/GridService/GridService.cs | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 991acf2..a2e4771 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs @@ -69,18 +69,40 @@ namespace OpenSim.Services.GridService ((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY))) { // Region reregistering in other coordinates. Delete the old entry - m_Database.Delete(regionInfos.RegionID); + m_log.DebugFormat("[GRID SERVICE]: Region {0} ({1}) was previously registered at {2}-{3}. Deleting old entry.", + regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY); + + try + { + m_Database.Delete(regionInfos.RegionID); + } + catch (Exception e) + { + m_log.DebugFormat("[GRID SERVICE]: Database exception: {0}", e); + } } // Everything is ok, let's register RegionData rdata = RegionInfo2RegionData(regionInfos); rdata.ScopeID = scopeID; - m_Database.Store(rdata); + try + { + m_Database.Store(rdata); + } + catch (Exception e) + { + m_log.DebugFormat("[GRID SERVICE]: Database exception: {0}", e); + } + + m_log.DebugFormat("[GRID SERVICE]: Region {0} ({1}) registered successfully at {2}-{3}", + regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY); + return true; } public bool DeregisterRegion(UUID regionID) { + m_log.DebugFormat("[GRID SERVICE]: Region {0} deregistered", regionID); return m_Database.Delete(regionID); } -- cgit v1.1 From 05b80185b9f74979eeab0d60ae4d7de56593264c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Oct 2009 11:49:21 -0700 Subject: More debug to try to diagnose a problem with region registration. --- OpenSim/Services/Connectors/Grid/GridServiceConnector.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs index ba46b0d..acdf558 100644 --- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs @@ -109,8 +109,13 @@ namespace OpenSim.Services.Connectors { Dictionary replyData = ServerUtils.ParseXmlResponse(reply); - if ((replyData["Result"] != null) && (replyData["Result"].ToString().ToLower() == "success")) + if (replyData.ContainsKey("Result")&& (replyData["Result"].ToString().ToLower() == "success")) return true; + else if (!replyData.ContainsKey("Result")) + m_log.DebugFormat("[GRID CONNECTOR]: reply data does not contain result field"); + else + m_log.DebugFormat("[GRID CONNECTOR]: unexpected result {0}", replyData["Result"].ToString()); + } else m_log.DebugFormat("[GRID CONNECTOR]: RegisterRegion received null reply"); -- cgit v1.1