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') 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') 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 596f2307bfdbb82ed1ee272408ea8363d968c919 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 7 Oct 2009 18:34:59 +0100 Subject: Add owner_uuid. Not sure this works. Worth a test --- OpenSim/Services/Interfaces/IGridService.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 2290530..14560b1 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -140,6 +140,14 @@ namespace OpenSim.Services.Interfaces } protected int m_regionLocY; + protected UUID m_estateOwner; + + public UUID EstateOwner + { + get { return m_estateOwner; } + set { m_estateOwner = value; } + } + public UUID RegionID = UUID.Zero; public UUID ScopeID = UUID.Zero; @@ -191,6 +199,7 @@ namespace OpenSim.Services.Interfaces Access = ConvertFrom.AccessLevel; Maturity = ConvertFrom.RegionSettings.Maturity; RegionSecret = ConvertFrom.regionSecret; + EstateOwner = ConvertFrom.EstateSettings.EstateOwner; } public GridRegion(GridRegion ConvertFrom) @@ -207,6 +216,7 @@ namespace OpenSim.Services.Interfaces Access = ConvertFrom.Access; Maturity = ConvertFrom.Maturity; RegionSecret = ConvertFrom.RegionSecret; + EstateOwner = ConvertFrom.EstateOwner; } /// @@ -291,6 +301,7 @@ namespace OpenSim.Services.Interfaces kvp["regionMapTexture"] = TerrainImage.ToString(); kvp["access"] = Access.ToString(); kvp["regionSecret"] = RegionSecret; + kvp["owner_uuid"] = EstateOwner.ToString(); // Maturity doesn't seem to exist in the DB return kvp; } @@ -345,6 +356,9 @@ namespace OpenSim.Services.Interfaces if (kvp.ContainsKey("regionSecret")) RegionSecret =(string)kvp["regionSecret"]; + if (kvp.ContainsKey("owner_uuid")) + EstateOwner = new UUID(kvp["owner_uuid"].ToString()); + } } -- 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') 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') 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 From d9f15fbf40f7eca81ff2ca6f3792820c6cabc605 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 7 Oct 2009 19:37:18 +0100 Subject: store owner_uuid in the region table --- OpenSim/Services/GridService/GridService.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index a2e4771..86815e5 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs @@ -200,6 +200,7 @@ namespace OpenSim.Services.GridService rdata.RegionName = rinfo.RegionName; rdata.Data = rinfo.ToKeyValuePairs(); rdata.Data["regionHandle"] = Utils.UIntsToLong((uint)rdata.posX, (uint)rdata.posY); + rdata.Data["owner_uuid"] = rinfo.EstateOwner.ToString(); return rdata; } -- cgit v1.1