aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs35
1 files changed, 16 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
index b192101..48ea519 100644
--- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
+++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
@@ -333,29 +333,26 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
333 333
334 public InventoryItemBase Get(InventoryItemBase item, UUID rootFolder, CachedUserInfo userInfo) 334 public InventoryItemBase Get(InventoryItemBase item, UUID rootFolder, CachedUserInfo userInfo)
335 { 335 {
336 if (!IsLocalUser(item.Owner)) 336 InventoryClient invCli = null;
337 string inventoryURL = UserInventoryURL(item.Owner);
338 if (!m_inventoryServers.TryGetValue(inventoryURL, out invCli))
337 { 339 {
338 InventoryClient invCli = null; 340 m_log.Debug("[HGScene]: Starting new InventorytClient for " + inventoryURL);
339 string inventoryURL = UserInventoryURL(item.Owner); 341 invCli = new InventoryClient(inventoryURL);
340 if (!m_inventoryServers.TryGetValue(inventoryURL, out invCli)) 342 m_inventoryServers.Add(inventoryURL, invCli);
341 { 343 }
342 m_log.Debug("[HGScene]: Starting new InventorytClient for " + inventoryURL);
343 invCli = new InventoryClient(inventoryURL);
344 m_inventoryServers.Add(inventoryURL, invCli);
345 }
346 344
347 item = invCli.GetInventoryItem(item); 345 item = invCli.GetInventoryItem(item);
348 if (item != null) 346 if (item != null)
347 {
348 // Change the folder, stick it in root folder, all items flattened out here in this region cache
349 item.Folder = rootFolder;
350 //userInfo.AddItem(item); don't use this, it calls back to the inventory server
351 lock (userInfo.RootFolder.Items)
349 { 352 {
350 // Change the folder, stick it in root folder, all items flattened out here in this region cache 353 userInfo.RootFolder.Items[item.ID] = item;
351 item.Folder = rootFolder;
352 //userInfo.AddItem(item); don't use this, it calls back to the inventory server
353 lock (userInfo.RootFolder.Items)
354 {
355 userInfo.RootFolder.Items[item.ID] = item;
356 }
357
358 } 354 }
355
359 } 356 }
360 return item; 357 return item;
361 } 358 }