aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer
diff options
context:
space:
mode:
authorMW2007-03-29 17:04:24 +0000
committerMW2007-03-29 17:04:24 +0000
commitf673b73471dd450881006a5281c15b4b70c96b2d (patch)
treebfefbf0ef295d9a8685818c8f4c3d1fd94aa831f /OpenSim.RegionServer
parent* vs2005 target gens OpenSim.csporj.user with -loginserver -sandbox -accounts... (diff)
downloadopensim-SC_OLD-f673b73471dd450881006a5281c15b4b70c96b2d.zip
opensim-SC_OLD-f673b73471dd450881006a5281c15b4b70c96b2d.tar.gz
opensim-SC_OLD-f673b73471dd450881006a5281c15b4b70c96b2d.tar.bz2
opensim-SC_OLD-f673b73471dd450881006a5281c15b4b70c96b2d.tar.xz
Fixed so Inventory structure is correct after a log out and re-login (in Sandbox accounts)
Diffstat (limited to '')
-rw-r--r--OpenSim.RegionServer/Assets/InventoryCache.cs13
-rw-r--r--OpenSim.RegionServer/SimClient.cs9
2 files changed, 21 insertions, 1 deletions
diff --git a/OpenSim.RegionServer/Assets/InventoryCache.cs b/OpenSim.RegionServer/Assets/InventoryCache.cs
index 1090940..cc7cc29 100644
--- a/OpenSim.RegionServer/Assets/InventoryCache.cs
+++ b/OpenSim.RegionServer/Assets/InventoryCache.cs
@@ -112,6 +112,19 @@ namespace OpenSim.Assets
112 return res; 112 return res;
113 } 113 }
114 114
115 public bool CreateNewInventoryFolder(SimClient remoteClient, LLUUID folderID, ushort type, string folderName, LLUUID parent)
116 {
117 bool res = false;
118 if (folderID != LLUUID.Zero) //don't create a folder with a zero id
119 {
120 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
121 {
122 res = this._agentsInventory[remoteClient.AgentID].CreateNewFolder(folderID, type, folderName, parent);
123 }
124 }
125 return res;
126 }
127
115 public LLUUID AddNewInventoryItem(SimClient remoteClient, LLUUID folderID, OpenSim.Framework.Assets.AssetBase asset) 128 public LLUUID AddNewInventoryItem(SimClient remoteClient, LLUUID folderID, OpenSim.Framework.Assets.AssetBase asset)
116 { 129 {
117 LLUUID newItem = null; 130 LLUUID newItem = null;
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs
index 6eb48fb..068e148 100644
--- a/OpenSim.RegionServer/SimClient.cs
+++ b/OpenSim.RegionServer/SimClient.cs
@@ -332,7 +332,7 @@ namespace OpenSim
332 break; 332 break;
333 case PacketType.CreateInventoryFolder: 333 case PacketType.CreateInventoryFolder:
334 CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack; 334 CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack;
335 m_inventoryCache.CreateNewInventoryFolder(this, invFolder.FolderData.FolderID, (ushort)invFolder.FolderData.Type); 335 m_inventoryCache.CreateNewInventoryFolder(this, invFolder.FolderData.FolderID, (ushort)invFolder.FolderData.Type, Helpers.FieldToString(invFolder.FolderData.Name), invFolder.FolderData.ParentID);
336 Console.WriteLine(Pack.ToString()); 336 Console.WriteLine(Pack.ToString());
337 break; 337 break;
338 case PacketType.CreateInventoryItem: 338 case PacketType.CreateInventoryItem:
@@ -361,6 +361,7 @@ namespace OpenSim
361 AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionID)); 361 AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionID));
362 if (asset != null) 362 if (asset != null)
363 { 363 {
364 Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToStringHyphenated() + " already in cache");
364 m_inventoryCache.UpdateInventoryItem(this, update.InventoryData[i].ItemID, asset); 365 m_inventoryCache.UpdateInventoryItem(this, update.InventoryData[i].ItemID, asset);
365 } 366 }
366 else 367 else
@@ -368,8 +369,13 @@ namespace OpenSim
368 asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID); 369 asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID);
369 if (asset != null) 370 if (asset != null)
370 { 371 {
372 Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToStringHyphenated() + " to cache");
371 m_inventoryCache.UpdateInventoryItem(this, update.InventoryData[i].ItemID, asset); 373 m_inventoryCache.UpdateInventoryItem(this, update.InventoryData[i].ItemID, asset);
372 } 374 }
375 else
376 {
377 Console.WriteLine("trying to update inventory item, but asset is null");
378 }
373 } 379 }
374 } 380 }
375 } 381 }
@@ -712,6 +718,7 @@ namespace OpenSim
712 if (this.m_userServer != null) 718 if (this.m_userServer != null)
713 { 719 {
714 // a user server is set so request the inventory from it 720 // a user server is set so request the inventory from it
721 Console.WriteLine("getting inventory from user server");
715 inventory = m_inventoryCache.FetchAgentsInventory(this.AgentID, m_userServer); 722 inventory = m_inventoryCache.FetchAgentsInventory(this.AgentID, m_userServer);
716 } 723 }
717 else 724 else