diff options
Diffstat (limited to 'OpenSim/Services')
-rw-r--r-- | OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs index cef678d..5443891 100644 --- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs | |||
@@ -236,42 +236,8 @@ namespace OpenSim.Services.Connectors | |||
236 | } | 236 | } |
237 | catch (Exception e) | 237 | catch (Exception e) |
238 | { | 238 | { |
239 | // Maybe we're talking to an old inventory server. Try this other thing. | 239 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderContent operation failed, {0} {1} (old server?).", |
240 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderContent operation failed, {0} {1} (old server?). Trying GetInventory.", | ||
241 | e.Source, e.Message); | 240 | e.Source, e.Message); |
242 | |||
243 | InventoryCollection inventory; | ||
244 | List<InventoryFolderBase> folders = null; | ||
245 | try | ||
246 | { | ||
247 | inventory = SynchronousRestSessionObjectPoster<Guid, InventoryCollection>.BeginPostObject( | ||
248 | "POST", m_ServerURI + "/GetInventory/", new Guid(userID), sessionID.ToString(), userID.ToString()); | ||
249 | if (inventory != null) | ||
250 | folders = inventory.Folders; | ||
251 | } | ||
252 | catch (Exception ex) | ||
253 | { | ||
254 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetInventory operation also failed, {0} {1}. Giving up.", | ||
255 | e.Source, ex.Message); | ||
256 | return new InventoryCollection(); | ||
257 | } | ||
258 | |||
259 | if ((folders != null) && (folders.Count > 0)) | ||
260 | { | ||
261 | m_log.DebugFormat("[INVENTORY CONNECTOR]: Received entire inventory ({0} folders) for user {1}", | ||
262 | folders.Count, userID); | ||
263 | |||
264 | folders = folders.FindAll(delegate(InventoryFolderBase f) { return f.ParentID == folderID; }); | ||
265 | List<InventoryItemBase> items = inventory.Items; | ||
266 | if (items != null) | ||
267 | { | ||
268 | items = items.FindAll(delegate(InventoryItemBase i) { return i.Folder == folderID; }); | ||
269 | } | ||
270 | |||
271 | inventory.Items = items; | ||
272 | inventory.Folders = folders; | ||
273 | return inventory; | ||
274 | } | ||
275 | } | 241 | } |
276 | 242 | ||
277 | InventoryCollection nullCollection = new InventoryCollection(); | 243 | InventoryCollection nullCollection = new InventoryCollection(); |