diff options
-rw-r--r-- | OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs | 2 | ||||
-rw-r--r-- | OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | 24 |
2 files changed, 24 insertions, 2 deletions
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs index 64127c2..9d28dc3 100644 --- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs +++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs | |||
@@ -155,7 +155,7 @@ namespace OpenSim.Server.Handlers.Asset | |||
155 | } | 155 | } |
156 | catch (Exception e) | 156 | catch (Exception e) |
157 | { | 157 | { |
158 | m_log.DebugFormat("[XINVENTORY HANDLER]: Exception {0}", e.StackTrace); | 158 | m_log.ErrorFormat("[XINVENTORY HANDLER]: Exception {0}", e.StackTrace); |
159 | } | 159 | } |
160 | 160 | ||
161 | return FailureResult(); | 161 | return FailureResult(); |
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index eecf757..410916f 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | |||
@@ -115,6 +115,12 @@ namespace OpenSim.Services.HypergridService | |||
115 | { | 115 | { |
116 | XInventoryFolder suitcase = GetSuitcaseXFolder(principalID); | 116 | XInventoryFolder suitcase = GetSuitcaseXFolder(principalID); |
117 | 117 | ||
118 | if (suitcase == null) | ||
119 | { | ||
120 | m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Found no suitcase folder for user {0} when looking for inventory skeleton", principalID); | ||
121 | return null; | ||
122 | } | ||
123 | |||
118 | List<XInventoryFolder> tree = GetFolderTree(principalID, suitcase.folderID); | 124 | List<XInventoryFolder> tree = GetFolderTree(principalID, suitcase.folderID); |
119 | if (tree == null || (tree != null && tree.Count == 0)) | 125 | if (tree == null || (tree != null && tree.Count == 0)) |
120 | return null; | 126 | return null; |
@@ -134,6 +140,7 @@ namespace OpenSim.Services.HypergridService | |||
134 | public override InventoryCollection GetUserInventory(UUID userID) | 140 | public override InventoryCollection GetUserInventory(UUID userID) |
135 | { | 141 | { |
136 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Get Suitcase inventory for user {0}", userID); | 142 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Get Suitcase inventory for user {0}", userID); |
143 | |||
137 | InventoryCollection userInventory = new InventoryCollection(); | 144 | InventoryCollection userInventory = new InventoryCollection(); |
138 | userInventory.UserID = userID; | 145 | userInventory.UserID = userID; |
139 | userInventory.Folders = new List<InventoryFolderBase>(); | 146 | userInventory.Folders = new List<InventoryFolderBase>(); |
@@ -141,6 +148,12 @@ namespace OpenSim.Services.HypergridService | |||
141 | 148 | ||
142 | XInventoryFolder suitcase = GetSuitcaseXFolder(userID); | 149 | XInventoryFolder suitcase = GetSuitcaseXFolder(userID); |
143 | 150 | ||
151 | if (suitcase == null) | ||
152 | { | ||
153 | m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Found no suitcase folder for user {0} when looking for user inventory", userID); | ||
154 | return null; | ||
155 | } | ||
156 | |||
144 | List<XInventoryFolder> tree = GetFolderTree(userID, suitcase.folderID); | 157 | List<XInventoryFolder> tree = GetFolderTree(userID, suitcase.folderID); |
145 | if (tree == null || (tree != null && tree.Count == 0)) | 158 | if (tree == null || (tree != null && tree.Count == 0)) |
146 | { | 159 | { |
@@ -182,7 +195,8 @@ namespace OpenSim.Services.HypergridService | |||
182 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetRootFolder for {0}", principalID); | 195 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetRootFolder for {0}", principalID); |
183 | 196 | ||
184 | // Let's find out the local root folder | 197 | // Let's find out the local root folder |
185 | XInventoryFolder root = GetRootXFolder(principalID); ; | 198 | XInventoryFolder root = GetRootXFolder(principalID); |
199 | |||
186 | if (root == null) | 200 | if (root == null) |
187 | { | 201 | { |
188 | m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to retrieve local root folder for user {0}", principalID); | 202 | m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to retrieve local root folder for user {0}", principalID); |
@@ -255,6 +269,13 @@ namespace OpenSim.Services.HypergridService | |||
255 | { | 269 | { |
256 | //m_log.DebugFormat("[HG INVENTORY SERVICE]: GetFolderForType for {0} {0}", principalID, type); | 270 | //m_log.DebugFormat("[HG INVENTORY SERVICE]: GetFolderForType for {0} {0}", principalID, type); |
257 | XInventoryFolder suitcase = GetSuitcaseXFolder(principalID); | 271 | XInventoryFolder suitcase = GetSuitcaseXFolder(principalID); |
272 | |||
273 | if (suitcase == null) | ||
274 | { | ||
275 | m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Found no suitcase folder for user {0} when looking for child type folder {1}", principalID, type); | ||
276 | return null; | ||
277 | } | ||
278 | |||
258 | XInventoryFolder[] folders = m_Database.GetFolders( | 279 | XInventoryFolder[] folders = m_Database.GetFolders( |
259 | new string[] { "agentID", "type", "parentFolderID" }, | 280 | new string[] { "agentID", "type", "parentFolderID" }, |
260 | new string[] { principalID.ToString(), ((int)type).ToString(), suitcase.folderID.ToString() }); | 281 | new string[] { principalID.ToString(), ((int)type).ToString(), suitcase.folderID.ToString() }); |
@@ -546,6 +567,7 @@ namespace OpenSim.Services.HypergridService | |||
546 | private bool IsWithinSuitcaseTree(UUID principalID, UUID folderID) | 567 | private bool IsWithinSuitcaseTree(UUID principalID, UUID folderID) |
547 | { | 568 | { |
548 | XInventoryFolder suitcase = GetSuitcaseXFolder(principalID); | 569 | XInventoryFolder suitcase = GetSuitcaseXFolder(principalID); |
570 | |||
549 | if (suitcase == null) | 571 | if (suitcase == null) |
550 | { | 572 | { |
551 | m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: User {0} does not have a Suitcase folder", principalID); | 573 | m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: User {0} does not have a Suitcase folder", principalID); |