diff options
author | Diva Canto | 2009-09-18 19:17:02 -0700 |
---|---|---|
committer | Diva Canto | 2009-09-18 19:17:02 -0700 |
commit | 4a55ff88c088ac0019a1106d97a8b8dd173c8cff (patch) | |
tree | aa91fe204048d6f050cffca83168aec61f76a9a2 /OpenSim/Services | |
parent | First pass at the grid service. (diff) | |
parent | correct off-by-one error in save iar command handling (diff) | |
download | opensim-SC-4a55ff88c088ac0019a1106d97a8b8dd173c8cff.zip opensim-SC-4a55ff88c088ac0019a1106d97a8b8dd173c8cff.tar.gz opensim-SC-4a55ff88c088ac0019a1106d97a8b8dd173c8cff.tar.bz2 opensim-SC-4a55ff88c088ac0019a1106d97a8b8dd173c8cff.tar.xz |
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
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(); |