aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-03-31 17:08:58 +0000
committerJustin Clarke Casey2008-03-31 17:08:58 +0000
commitaf3118eccd0d471b748a1dd89e6899b51ae0332c (patch)
treee2dc630f183ca425c8adc6cdfa0657812c829646 /OpenSim
parent* Fix for mantis 131, 796 (diff)
downloadopensim-SC_OLD-af3118eccd0d471b748a1dd89e6899b51ae0332c.zip
opensim-SC_OLD-af3118eccd0d471b748a1dd89e6899b51ae0332c.tar.gz
opensim-SC_OLD-af3118eccd0d471b748a1dd89e6899b51ae0332c.tar.bz2
opensim-SC_OLD-af3118eccd0d471b748a1dd89e6899b51ae0332c.tar.xz
* Fix problem where inventory code throws a swallowed exception on grid mode if the avatar has never logged in before
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/InventoryServiceBase.cs50
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs2
2 files changed, 34 insertions, 18 deletions
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index a0228e8..3187215 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -79,25 +79,41 @@ namespace OpenSim.Framework.Communications
79 // See IInventoryServices 79 // See IInventoryServices
80 public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId) 80 public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId)
81 { 81 {
82 //m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId); 82 try
83
84 List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>();
85
86 InventoryFolderBase rootFolder = RequestRootFolder(userId);
87 userFolders.Add(rootFolder);
88
89 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
90 { 83 {
91 IList<InventoryFolderBase> folders = plugin.Value.getFolderHierarchy(rootFolder.folderID); 84 m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
92 userFolders.AddRange(folders); 85
93 } 86 List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>();
94 87
95// foreach (InventoryFolderBase folder in userFolders) 88 InventoryFolderBase rootFolder = RequestRootFolder(userId);
96// { 89
97// m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID); 90 // Agent is completely new and has no inventory structure yet.
98// } 91 if (null == rootFolder)
92 {
93 return null;
94 }
95
96 userFolders.Add(rootFolder);
97
98 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
99 {
100 IList<InventoryFolderBase> folders = plugin.Value.getFolderHierarchy(rootFolder.folderID);
101 userFolders.AddRange(folders);
102 }
103
104 // foreach (InventoryFolderBase folder in userFolders)
105 // {
106 // m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID);
107 // }
108
109 return userFolders;
110 }
111 catch (Exception e)
112 {
113 m_log.ErrorFormat("GetInventorySkeleton() exception {0}", e);
114 }
99 115
100 return userFolders; 116 return null;
101 } 117 }
102 118
103 // See IInventoryServices 119 // See IInventoryServices
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 1187c37..fb4f02c 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -1201,7 +1201,7 @@ namespace OpenSim.Region.Environment.Scenes
1201 } 1201 }
1202 1202
1203 /// <summary> 1203 /// <summary>
1204 /// 1204 /// Duplicate the given object.
1205 /// </summary> 1205 /// </summary>
1206 /// <param name="originalPrim"></param> 1206 /// <param name="originalPrim"></param>
1207 /// <param name="offset"></param> 1207 /// <param name="offset"></param>