diff options
author | Justin Clark-Casey (justincc) | 2009-09-18 19:26:22 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-09-18 19:26:22 +0100 |
commit | a1e688bdf3ab354104545623bb1784213d479e0a (patch) | |
tree | d29552ec2f6cb3d3136cdab68e36a9969285e88d /OpenSim/Services | |
parent | Remove old OpenSim.Example.xml file that doesn't keep up with OpenSim.ini.exa... (diff) | |
parent | addition of a new script function osSetParcelSIPAddress(string SIPAddress), n... (diff) | |
download | opensim-SC-a1e688bdf3ab354104545623bb1784213d479e0a.zip opensim-SC-a1e688bdf3ab354104545623bb1784213d479e0a.tar.gz opensim-SC-a1e688bdf3ab354104545623bb1784213d479e0a.tar.bz2 opensim-SC-a1e688bdf3ab354104545623bb1784213d479e0a.tar.xz |
Merge branch 'master' of ssh://justincc@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(); |