aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/Assets/InventoryCache.cs
diff options
context:
space:
mode:
authorMW2007-03-28 18:10:52 +0000
committerMW2007-03-28 18:10:52 +0000
commit35fa85069e792579ebd44a974053d6dce288ea0a (patch)
tree8a5629c4f5e0a51e20a05123c4b1b9ea9f49f61e /OpenSim.RegionServer/Assets/InventoryCache.cs
parent* log file name conflict (diff)
downloadopensim-SC_OLD-35fa85069e792579ebd44a974053d6dce288ea0a.zip
opensim-SC_OLD-35fa85069e792579ebd44a974053d6dce288ea0a.tar.gz
opensim-SC_OLD-35fa85069e792579ebd44a974053d6dce288ea0a.tar.bz2
opensim-SC_OLD-35fa85069e792579ebd44a974053d6dce288ea0a.tar.xz
After hours of searching for a bug, it works - User accounts in sandbox mode, currently they are not persistent between restarts (ie restarting opensim.exe) but should be persistent between sessions (login/ logout).
Use the -account command line arg to enable them and then create new accounts through the web interface
Diffstat (limited to 'OpenSim.RegionServer/Assets/InventoryCache.cs')
-rw-r--r--OpenSim.RegionServer/Assets/InventoryCache.cs27
1 files changed, 23 insertions, 4 deletions
diff --git a/OpenSim.RegionServer/Assets/InventoryCache.cs b/OpenSim.RegionServer/Assets/InventoryCache.cs
index 3a4aa36..1090940 100644
--- a/OpenSim.RegionServer/Assets/InventoryCache.cs
+++ b/OpenSim.RegionServer/Assets/InventoryCache.cs
@@ -33,6 +33,7 @@ using libsecondlife.Packets;
33//using OpenSim.GridServers; 33//using OpenSim.GridServers;
34using OpenSim.Framework.Inventory; 34using OpenSim.Framework.Inventory;
35using OpenSim.Framework.Assets; 35using OpenSim.Framework.Assets;
36using OpenSim.Framework.Interfaces;
36 37
37namespace OpenSim.Assets 38namespace OpenSim.Assets
38{ 39{
@@ -54,7 +55,21 @@ namespace OpenSim.Assets
54 55
55 public void AddNewAgentsInventory(AgentInventory agentInventory) 56 public void AddNewAgentsInventory(AgentInventory agentInventory)
56 { 57 {
57 this._agentsInventory.Add(agentInventory.AgentID, agentInventory); 58 if (!this._agentsInventory.ContainsKey(agentInventory.AgentID))
59 {
60 this._agentsInventory.Add(agentInventory.AgentID, agentInventory);
61 }
62 }
63
64 public AgentInventory FetchAgentsInventory(LLUUID agentID, IUserServer userserver)
65 {
66 AgentInventory res = null;
67 if (!this._agentsInventory.ContainsKey(agentID))
68 {
69 res = userserver.RequestAgentsInventory(agentID);
70 this._agentsInventory.Add(agentID,res);
71 }
72 return res;
58 } 73 }
59 74
60 public AgentInventory GetAgentsInventory(LLUUID agentID) 75 public AgentInventory GetAgentsInventory(LLUUID agentID)
@@ -67,13 +82,16 @@ namespace OpenSim.Assets
67 return null; 82 return null;
68 } 83 }
69 84
70 public void ClientLeaving(LLUUID clientID) 85 public void ClientLeaving(LLUUID clientID, IUserServer userserver)
71 { 86 {
72 if (this._agentsInventory.ContainsKey(clientID)) 87 if (this._agentsInventory.ContainsKey(clientID))
73 { 88 {
89 if (userserver != null)
90 {
91 userserver.UpdateAgentsInventory(clientID, this._agentsInventory[clientID]);
92 }
74 this._agentsInventory.Remove(clientID); 93 this._agentsInventory.Remove(clientID);
75 } 94 }
76
77 } 95 }
78 96
79 public bool CreateNewInventoryFolder(SimClient remoteClient, LLUUID folderID) 97 public bool CreateNewInventoryFolder(SimClient remoteClient, LLUUID folderID)
@@ -171,6 +189,7 @@ namespace OpenSim.Assets
171 Descend.ItemData[i].Type = Item.Type; 189 Descend.ItemData[i].Type = Item.Type;
172 Descend.ItemData[i].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); 190 Descend.ItemData[i].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
173 } 191 }
192
174 userInfo.OutPacket(Descend); 193 userInfo.OutPacket(Descend);
175 194
176 } 195 }