aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/UserManager/LoginService.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/UserManager/LoginService.cs32
1 files changed, 20 insertions, 12 deletions
diff --git a/OpenSim/Framework/UserManager/LoginService.cs b/OpenSim/Framework/UserManager/LoginService.cs
index a26a0c4..b75c4fb 100644
--- a/OpenSim/Framework/UserManager/LoginService.cs
+++ b/OpenSim/Framework/UserManager/LoginService.cs
@@ -89,14 +89,14 @@ namespace OpenSim.Framework.UserManagement
89 LLUUID agentID = userProfile.UUID; 89 LLUUID agentID = userProfile.UUID;
90 90
91 // Inventory Library Section 91 // Inventory Library Section
92 AgentInventory userInventory = this.GetUsersInventory(agentID); 92 InventoryData inventData = this.CreateInventoryData(agentID);
93 ArrayList AgentInventoryArray = this.CreateInventoryArray(userInventory); 93 ArrayList AgentInventoryArray = inventData.InventoryArray;
94 94
95 Hashtable InventoryRootHash = new Hashtable(); 95 Hashtable InventoryRootHash = new Hashtable();
96 InventoryRootHash["folder_id"] = userInventory.InventoryRoot.FolderID.ToStringHyphenated(); 96 InventoryRootHash["folder_id"] = inventData.RootFolderID.ToStringHyphenated();
97 ArrayList InventoryRoot = new ArrayList(); 97 ArrayList InventoryRoot = new ArrayList();
98 InventoryRoot.Add(InventoryRootHash); 98 InventoryRoot.Add(InventoryRootHash);
99 userProfile.rootInventoryFolderID = userInventory.InventoryRoot.FolderID; 99 userProfile.rootInventoryFolderID = inventData.RootFolderID;
100 100
101 // Circuit Code 101 // Circuit Code
102 uint circode = (uint)(Util.RandomClass.Next()); 102 uint circode = (uint)(Util.RandomClass.Next());
@@ -253,16 +253,11 @@ namespace OpenSim.Framework.UserManagement
253 return inventoryLibOwner; 253 return inventoryLibOwner;
254 } 254 }
255 255
256 protected virtual AgentInventory GetUsersInventory(LLUUID agentID) 256 protected virtual InventoryData CreateInventoryData(LLUUID userID)
257 { 257 {
258 AgentInventory userInventory = new AgentInventory(); 258 AgentInventory userInventory = new AgentInventory();
259 userInventory.CreateRootFolder(agentID, false); 259 userInventory.CreateRootFolder(userID, false);
260 260
261 return userInventory;
262 }
263
264 protected virtual ArrayList CreateInventoryArray(AgentInventory userInventory)
265 {
266 ArrayList AgentInventoryArray = new ArrayList(); 261 ArrayList AgentInventoryArray = new ArrayList();
267 Hashtable TempHash; 262 Hashtable TempHash;
268 foreach (InventoryFolder InvFolder in userInventory.InventoryFolders.Values) 263 foreach (InventoryFolder InvFolder in userInventory.InventoryFolders.Values)
@@ -275,7 +270,20 @@ namespace OpenSim.Framework.UserManagement
275 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); 270 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated();
276 AgentInventoryArray.Add(TempHash); 271 AgentInventoryArray.Add(TempHash);
277 } 272 }
278 return AgentInventoryArray; 273
274 return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID);
275 }
276
277 public class InventoryData
278 {
279 public ArrayList InventoryArray = null;
280 public LLUUID RootFolderID = LLUUID.Zero;
281
282 public InventoryData(ArrayList invList, LLUUID rootID)
283 {
284 InventoryArray = invList;
285 RootFolderID = rootID;
286 }
279 } 287 }
280 } 288 }
281} 289}