diff options
author | lbsa71 | 2007-09-27 14:57:43 +0000 |
---|---|---|
committer | lbsa71 | 2007-09-27 14:57:43 +0000 |
commit | 863195612bdef56165f2b4354bab280c371618b9 (patch) | |
tree | 63cec15a6c0338a8777640ed13fd7c3ce05eeba7 /OpenSim/Region/Communications/Local/LocalLoginService.cs | |
parent | revert change to libsecondlife.dll.config which breaks Linux (diff) | |
download | opensim-SC-863195612bdef56165f2b4354bab280c371618b9.zip opensim-SC-863195612bdef56165f2b4354bab280c371618b9.tar.gz opensim-SC-863195612bdef56165f2b4354bab280c371618b9.tar.bz2 opensim-SC-863195612bdef56165f2b4354bab280c371618b9.tar.xz |
Reverting back to 2017 since 2018 were causing Linux breakage; reopening Tleiades patch 444 and 445.
Diffstat (limited to 'OpenSim/Region/Communications/Local/LocalLoginService.cs')
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalLoginService.cs | 51 |
1 files changed, 49 insertions, 2 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 95fdf5a..ab8e397 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -7,6 +7,7 @@ using OpenSim.Framework.Data; | |||
7 | using OpenSim.Framework.Types; | 7 | using OpenSim.Framework.Types; |
8 | using OpenSim.Framework.UserManagement; | 8 | using OpenSim.Framework.UserManagement; |
9 | using OpenSim.Framework.Utilities; | 9 | using OpenSim.Framework.Utilities; |
10 | using OpenSim.Framework.Inventory; | ||
10 | 11 | ||
11 | namespace OpenSim.Region.Communications.Local | 12 | namespace OpenSim.Region.Communications.Local |
12 | { | 13 | { |
@@ -24,7 +25,7 @@ namespace OpenSim.Region.Communications.Local | |||
24 | public event LoginToRegionEvent OnLoginToRegion; | 25 | public event LoginToRegionEvent OnLoginToRegion; |
25 | 26 | ||
26 | public LocalLoginService(UserManagerBase userManager, string welcomeMess, CommunicationsLocal parent, NetworkServersInfo serversInfo, bool authenticate) | 27 | public LocalLoginService(UserManagerBase userManager, string welcomeMess, CommunicationsLocal parent, NetworkServersInfo serversInfo, bool authenticate) |
27 | : base(userManager, parent.InventoryService, welcomeMess) | 28 | : base(userManager, welcomeMess) |
28 | { | 29 | { |
29 | m_Parent = parent; | 30 | m_Parent = parent; |
30 | this.serversInfo = serversInfo; | 31 | this.serversInfo = serversInfo; |
@@ -52,7 +53,7 @@ namespace OpenSim.Region.Communications.Local | |||
52 | profile = this.m_userManager.GetUserProfile(firstname, lastname); | 53 | profile = this.m_userManager.GetUserProfile(firstname, lastname); |
53 | if (profile != null) | 54 | if (profile != null) |
54 | { | 55 | { |
55 | m_Parent.InventoryService.CreateNewUserInventory(LLUUID.Zero, profile.UUID); | 56 | m_Parent.InventoryService.CreateNewUserInventory(profile.UUID); |
56 | } | 57 | } |
57 | 58 | ||
58 | return profile; | 59 | return profile; |
@@ -122,5 +123,51 @@ namespace OpenSim.Region.Communications.Local | |||
122 | } | 123 | } |
123 | 124 | ||
124 | } | 125 | } |
126 | |||
127 | protected override InventoryData CreateInventoryData(LLUUID userID) | ||
128 | { | ||
129 | List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID); | ||
130 | if (folders.Count > 0) | ||
131 | { | ||
132 | LLUUID rootID = LLUUID.Zero; | ||
133 | ArrayList AgentInventoryArray = new ArrayList(); | ||
134 | Hashtable TempHash; | ||
135 | foreach (InventoryFolderBase InvFolder in folders) | ||
136 | { | ||
137 | if (InvFolder.parentID == LLUUID.Zero) | ||
138 | { | ||
139 | rootID = InvFolder.folderID; | ||
140 | } | ||
141 | TempHash = new Hashtable(); | ||
142 | TempHash["name"] = InvFolder.name; | ||
143 | TempHash["parent_id"] = InvFolder.parentID.ToStringHyphenated(); | ||
144 | TempHash["version"] = (Int32)InvFolder.version; | ||
145 | TempHash["type_default"] = (Int32)InvFolder.type; | ||
146 | TempHash["folder_id"] = InvFolder.folderID.ToStringHyphenated(); | ||
147 | AgentInventoryArray.Add(TempHash); | ||
148 | } | ||
149 | return new InventoryData(AgentInventoryArray, rootID); | ||
150 | } | ||
151 | else | ||
152 | { | ||
153 | AgentInventory userInventory = new AgentInventory(); | ||
154 | userInventory.CreateRootFolder(userID, false); | ||
155 | |||
156 | ArrayList AgentInventoryArray = new ArrayList(); | ||
157 | Hashtable TempHash; | ||
158 | foreach (OpenSim.Framework.Inventory.InventoryFolder InvFolder in userInventory.InventoryFolders.Values) | ||
159 | { | ||
160 | TempHash = new Hashtable(); | ||
161 | TempHash["name"] = InvFolder.FolderName; | ||
162 | TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); | ||
163 | TempHash["version"] = (Int32)InvFolder.Version; | ||
164 | TempHash["type_default"] = (Int32)InvFolder.DefaultType; | ||
165 | TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); | ||
166 | AgentInventoryArray.Add(TempHash); | ||
167 | } | ||
168 | |||
169 | return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID); | ||
170 | } | ||
171 | } | ||
125 | } | 172 | } |
126 | } | 173 | } |