From 77b4abaa251929a4d6079d766f041f997071dc46 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 6 Oct 2009 11:08:11 -0700 Subject: * Removed verbose debug message * Restored HG inventory access which had been lost upon adding a 3rd argument to inventory and asset server handlers * Fixed a stupid bug in the InventoryConnector which was making move items do things twice --- OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs index 5443891..e047f71 100644 --- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs @@ -416,13 +416,6 @@ namespace OpenSim.Services.Connectors e.Source, e.Message); } - foreach (InventoryItemBase item in items) - { - InventoryItemBase itm = this.QueryItem(userID, item, sessionID); - itm.Name = item.Name; - itm.Folder = item.Folder; - this.UpdateItem(userID, itm, sessionID); - } } private void MoveItemsCompleted(IAsyncResult iar) -- cgit v1.1 From 78e4501bef27c04f317153dcec45346a7f3987ab Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 7 Oct 2009 08:42:33 -0700 Subject: Improved fault handling in HelloNeighbour. --- .../Neighbour/NeighbourServiceConnector.cs | 36 ++++++++++++++-------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs index 145f212..0a982f8 100644 --- a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs +++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs @@ -76,10 +76,12 @@ namespace OpenSim.Services.Connectors // Don't remote-call this instance; that's a startup hickup !((regInfo.ExternalHostName == thisRegion.ExternalHostName) && (regInfo.HttpPort == thisRegion.HttpPort))) { - DoHelloNeighbourCall(regInfo, thisRegion); + if (!DoHelloNeighbourCall(regInfo, thisRegion)) + return null; } - //else - // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); + else + return null; + return regInfo; } @@ -102,6 +104,7 @@ namespace OpenSim.Services.Connectors catch (Exception e) { m_log.Debug("[REST COMMS]: PackRegionInfoData failed with exception: " + e.Message); + return false; } // Add the regionhandle of the destination region args["destination_handle"] = OSD.FromString(region.RegionHandle.ToString()); @@ -118,7 +121,7 @@ namespace OpenSim.Services.Connectors catch (Exception e) { m_log.WarnFormat("[REST COMMS]: Exception thrown on serialization of HelloNeighbour: {0}", e.Message); - // ignore. buffer will be empty, caller should check. + return false; } Stream os = null; @@ -127,20 +130,23 @@ namespace OpenSim.Services.Connectors HelloNeighbourRequest.ContentLength = buffer.Length; //Count bytes to send os = HelloNeighbourRequest.GetRequestStream(); os.Write(buffer, 0, strBuffer.Length); //Send it - os.Close(); //m_log.InfoFormat("[REST COMMS]: Posted HelloNeighbour request to remote sim {0}", uri); } - //catch (WebException ex) - catch + catch (Exception ex) { - //m_log.InfoFormat("[REST COMMS]: Bad send on HelloNeighbour {0}", ex.Message); - + m_log.InfoFormat("[REST COMMS]: Unable to send HelloNeighbour to {0}: {1}", region.RegionName, ex.Message); return false; } + finally + { + if (os != null) + os.Close(); + } // Let's wait for the response //m_log.Info("[REST COMMS]: Waiting for a reply after DoHelloNeighbourCall"); + StreamReader sr = null; try { WebResponse webResponse = HelloNeighbourRequest.GetResponse(); @@ -149,17 +155,21 @@ namespace OpenSim.Services.Connectors m_log.Info("[REST COMMS]: Null reply on DoHelloNeighbourCall post"); } - StreamReader sr = new StreamReader(webResponse.GetResponseStream()); + sr = new StreamReader(webResponse.GetResponseStream()); //reply = sr.ReadToEnd().Trim(); sr.ReadToEnd().Trim(); - sr.Close(); //m_log.InfoFormat("[REST COMMS]: DoHelloNeighbourCall reply was {0} ", reply); } - catch (WebException ex) + catch (Exception ex) { m_log.InfoFormat("[REST COMMS]: exception on reply of DoHelloNeighbourCall {0}", ex.Message); - // ignore, really + return false; + } + finally + { + if (sr != null) + sr.Close(); } return true; -- cgit v1.1 From a0b6cc38610fb1d6beb3895f01ab1d06af37dd61 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 7 Oct 2009 19:10:18 +0100 Subject: Enable debugging of the region connector's query string --- OpenSim/Services/Connectors/Grid/GridServiceConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs index acdf558..30f5ed0 100644 --- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs @@ -99,7 +99,7 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "register"; string reqString = ServerUtils.BuildQueryString(sendData); - //m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString); + m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString); try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", -- cgit v1.1 From 48826fcdf7145a6113d8d61e50c2a76d51a79c86 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 7 Oct 2009 19:22:27 +0100 Subject: Remove debug again --- OpenSim/Services/Connectors/Grid/GridServiceConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs index 30f5ed0..02f2b79 100644 --- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs @@ -99,7 +99,7 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "register"; string reqString = ServerUtils.BuildQueryString(sendData); - m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString); + // m_log.DebugFormat("[GRID CONNECTOR]: queryString = {0}", reqString); try { string reply = SynchronousRestFormsRequester.MakeRequest("POST", -- cgit v1.1