aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-03-31 18:29:08 +0000
committerJustin Clarke Casey2008-03-31 18:29:08 +0000
commit93303072dd4edbb7d41ed629787bd22494b30cc1 (patch)
treed4a9865accd96c68747bf889db46e5793533834b /OpenSim/Region
parent* Log exceptions which make it up to the top of the http request frame, rathe... (diff)
downloadopensim-SC-93303072dd4edbb7d41ed629787bd22494b30cc1.zip
opensim-SC-93303072dd4edbb7d41ed629787bd22494b30cc1.tar.gz
opensim-SC-93303072dd4edbb7d41ed629787bd22494b30cc1.tar.bz2
opensim-SC-93303072dd4edbb7d41ed629787bd22494b30cc1.tar.xz
* Minor: If a user exists but has no inventory in standalone, automatically create new inventory folders
* This mirrors the grid behaviour
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs55
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs2
2 files changed, 22 insertions, 35 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 3cea82d..8583e61 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -217,47 +217,32 @@ namespace OpenSim.Region.Communications.Local
217 { 217 {
218 List<InventoryFolderBase> folders = m_Parent.InventoryService.GetInventorySkeleton(userID); 218 List<InventoryFolderBase> folders = m_Parent.InventoryService.GetInventorySkeleton(userID);
219 219
220 if (folders.Count > 0) 220 // If we have user auth but no inventory folders for some reason, create a new set of folders.
221 if (null == folders || 0 == folders.Count)
221 { 222 {
222 LLUUID rootID = LLUUID.Zero; 223 m_Parent.InventoryService.CreateNewUserInventory(userID);
223 ArrayList AgentInventoryArray = new ArrayList(); 224 folders = m_Parent.InventoryService.GetInventorySkeleton(userID);
224 Hashtable TempHash;
225 foreach (InventoryFolderBase InvFolder in folders)
226 {
227 if (InvFolder.parentID == LLUUID.Zero)
228 {
229 rootID = InvFolder.folderID;
230 }
231 TempHash = new Hashtable();
232 TempHash["name"] = InvFolder.name;
233 TempHash["parent_id"] = InvFolder.parentID.ToString();
234 TempHash["version"] = (Int32) InvFolder.version;
235 TempHash["type_default"] = (Int32) InvFolder.type;
236 TempHash["folder_id"] = InvFolder.folderID.ToString();
237 AgentInventoryArray.Add(TempHash);
238 }
239 return new InventoryData(AgentInventoryArray, rootID);
240 } 225 }
241 else 226
227 LLUUID rootID = LLUUID.Zero;
228 ArrayList AgentInventoryArray = new ArrayList();
229 Hashtable TempHash;
230 foreach (InventoryFolderBase InvFolder in folders)
242 { 231 {
243 AgentInventory userInventory = new AgentInventory(); 232 if (InvFolder.parentID == LLUUID.Zero)
244 userInventory.CreateRootFolder(userID);
245
246 ArrayList AgentInventoryArray = new ArrayList();
247 Hashtable TempHash;
248 foreach (InventoryFolder InvFolder in userInventory.InventoryFolders.Values)
249 { 233 {
250 TempHash = new Hashtable(); 234 rootID = InvFolder.folderID;
251 TempHash["name"] = InvFolder.FolderName;
252 TempHash["parent_id"] = InvFolder.ParentID.ToString();
253 TempHash["version"] = (Int32) InvFolder.Version;
254 TempHash["type_default"] = (Int32) InvFolder.DefaultType;
255 TempHash["folder_id"] = InvFolder.FolderID.ToString();
256 AgentInventoryArray.Add(TempHash);
257 } 235 }
258 236 TempHash = new Hashtable();
259 return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID); 237 TempHash["name"] = InvFolder.name;
238 TempHash["parent_id"] = InvFolder.parentID.ToString();
239 TempHash["version"] = (Int32) InvFolder.version;
240 TempHash["type_default"] = (Int32) InvFolder.type;
241 TempHash["folder_id"] = InvFolder.folderID.ToString();
242 AgentInventoryArray.Add(TempHash);
260 } 243 }
244
245 return new InventoryData(AgentInventoryArray, rootID);
261 } 246 }
262 } 247 }
263} 248}
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index fb4f02c..c009593 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -1208,6 +1208,8 @@ namespace OpenSim.Region.Environment.Scenes
1208 /// <param name="flags"></param> 1208 /// <param name="flags"></param>
1209 public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID) 1209 public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID)
1210 { 1210 {
1211 m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID);
1212
1211 List<EntityBase> EntityList = GetEntities(); 1213 List<EntityBase> EntityList = GetEntities();
1212 1214
1213 SceneObjectGroup originPrim = null; 1215 SceneObjectGroup originPrim = null;