diff options
author | Melanie | 2010-12-04 05:01:44 +0100 |
---|---|---|
committer | Melanie | 2010-12-04 04:50:24 +0000 |
commit | 4ca108f85ee886dbf3605481f5901d6f2e197c30 (patch) | |
tree | 9438eafc9414054ad5f538d069e6d22adfbbf2e2 /OpenSim/Region/CoreModules | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-4ca108f85ee886dbf3605481f5901d6f2e197c30.zip opensim-SC_OLD-4ca108f85ee886dbf3605481f5901d6f2e197c30.tar.gz opensim-SC_OLD-4ca108f85ee886dbf3605481f5901d6f2e197c30.tar.bz2 opensim-SC_OLD-4ca108f85ee886dbf3605481f5901d6f2e197c30.tar.xz |
Simplify updating of agent inventory assets. Make newly created asset IDs
random rather than using IDs known by the client ahead of time.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs index 0af113a..c66a4ea 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs | |||
@@ -149,10 +149,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
149 | 149 | ||
150 | if (asset != null) | 150 | if (asset != null) |
151 | { | 151 | { |
152 | m_log.DebugFormat( | 152 | asset.FullID = UUID.Random(); |
153 | "[ASSET TRANSACTIONS]: Updating task item {0} in {1} with asset in transaction {2}", | ||
154 | item.Name, part.Name, transactionID); | ||
155 | |||
156 | asset.Name = item.Name; | 153 | asset.Name = item.Name; |
157 | asset.Description = item.Description; | 154 | asset.Description = item.Description; |
158 | asset.Type = (sbyte)item.Type; | 155 | asset.Type = (sbyte)item.Type; |
@@ -170,20 +167,10 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
170 | { | 167 | { |
171 | if (XferUploaders.ContainsKey(transactionID)) | 168 | if (XferUploaders.ContainsKey(transactionID)) |
172 | { | 169 | { |
173 | UUID assetID = UUID.Combine(transactionID, | 170 | AssetBase asset = GetTransactionAsset(transactionID); |
174 | remoteClient.SecureSessionId); | ||
175 | |||
176 | AssetBase asset = m_Scene.AssetService.Get( | ||
177 | assetID.ToString()); | ||
178 | |||
179 | if (asset == null) | ||
180 | { | ||
181 | asset = GetTransactionAsset(transactionID); | ||
182 | } | ||
183 | 171 | ||
184 | if (asset != null && asset.FullID == assetID) | 172 | if (asset != null) |
185 | { | 173 | { |
186 | // Assets never get updated, new ones get created | ||
187 | asset.FullID = UUID.Random(); | 174 | asset.FullID = UUID.Random(); |
188 | asset.Name = item.Name; | 175 | asset.Name = item.Name; |
189 | asset.Description = item.Description; | 176 | asset.Description = item.Description; |
@@ -191,10 +178,10 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
191 | item.AssetID = asset.FullID; | 178 | item.AssetID = asset.FullID; |
192 | 179 | ||
193 | m_Scene.AssetService.Store(asset); | 180 | m_Scene.AssetService.Store(asset); |
194 | } | ||
195 | 181 | ||
196 | IInventoryService invService = m_Scene.InventoryService; | 182 | IInventoryService invService = m_Scene.InventoryService; |
197 | invService.UpdateItem(item); | 183 | invService.UpdateItem(item); |
184 | } | ||
198 | } | 185 | } |
199 | } | 186 | } |
200 | } | 187 | } |