From d8931def060ec41fd64ce7b6ab569e14a8f9005b Mon Sep 17 00:00:00 2001 From: diva Date: Sat, 16 May 2009 00:23:32 +0000 Subject: Another minor bug fix for making notecard/script savings work with old asset servers. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 +- OpenSim/Servers/Connectors/Asset/AssetServiceConnector.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 0694576..965b12a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -193,9 +193,9 @@ namespace OpenSim.Region.Framework.Scenes AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data); + item.AssetID = asset.FullID; AssetService.Store(asset); - item.AssetID = asset.FullID; userInfo.UpdateItem(item); // remoteClient.SendInventoryItemCreateUpdate(item); diff --git a/OpenSim/Servers/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Servers/Connectors/Asset/AssetServiceConnector.cs index efd5eea..cebd471 100644 --- a/OpenSim/Servers/Connectors/Asset/AssetServiceConnector.cs +++ b/OpenSim/Servers/Connectors/Asset/AssetServiceConnector.cs @@ -195,7 +195,10 @@ namespace OpenSim.Servers.Connectors if (newID != String.Empty) { - asset.ID = newID; + // Placing this here, so that this work with old asset servers that don't send any reply back + // SynchronousRestObjectRequester returns somethins that is not an empty string + if (!"00000000-0000-0000-0000-000000000000".Equals(newID)) + asset.ID = newID; if (m_Cache != null) m_Cache.Cache(asset); -- cgit v1.1