From 16f77fa1f1342f2de306c9b4fb7e3c1cd0478c32 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 7 Feb 2010 16:41:41 -0800 Subject: Finished implementing the XInventory connector. Untested. --- .../Connectors/Inventory/XInventoryConnector.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs index b9ccd7e..3309d16 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs @@ -92,6 +92,8 @@ namespace OpenSim.Services.Connectors if (ret == null) return false; + if (ret.Count == 0) + return false; return bool.Parse(ret["RESULT"].ToString()); } @@ -105,6 +107,8 @@ namespace OpenSim.Services.Connectors if (ret == null) return null; + if (ret.Count == 0) + return null; List folders = new List(); @@ -122,8 +126,7 @@ namespace OpenSim.Services.Connectors }); if (ret == null) - return null; - + return null; if (ret.Count == 0) return null; @@ -140,7 +143,6 @@ namespace OpenSim.Services.Connectors if (ret == null) return null; - if (ret.Count == 0) return null; @@ -157,7 +159,6 @@ namespace OpenSim.Services.Connectors if (ret == null) return null; - if (ret.Count == 0) return null; @@ -182,7 +183,7 @@ namespace OpenSim.Services.Connectors public List GetFolderItems(UUID principalID, UUID folderID) { - Dictionary ret = MakeRequest("GETFOLDERCONTENT", + Dictionary ret = MakeRequest("GETFOLDERITEMS", new Dictionary { { "PRINCIPAL", principalID.ToString() }, { "FOLDER", folderID.ToString() } @@ -190,7 +191,6 @@ namespace OpenSim.Services.Connectors if (ret == null) return null; - if (ret.Count == 0) return null; @@ -244,7 +244,8 @@ namespace OpenSim.Services.Connectors Dictionary ret = MakeRequest("MOVEFOLDER", new Dictionary { { "ParentID", folder.ParentID.ToString() }, - { "ID", folder.ID.ToString() } + { "ID", folder.ID.ToString() }, + { "PRINCIPAL", folder.Owner.ToString() } }); if (ret == null) @@ -362,7 +363,7 @@ namespace OpenSim.Services.Connectors Dictionary ret = MakeRequest("MOVEITEMS", new Dictionary { - { "PrincipalID", principalID.ToString() }, + { "PRINCIPAL", principalID.ToString() }, { "IDLIST", idlist }, { "DESTLIST", destlist } }); @@ -401,7 +402,6 @@ namespace OpenSim.Services.Connectors if (ret == null) return null; - if (ret.Count == 0) return null; @@ -417,7 +417,6 @@ namespace OpenSim.Services.Connectors if (ret == null) return null; - if (ret.Count == 0) return null; @@ -531,5 +530,6 @@ namespace OpenSim.Services.Connectors return item; } + } } -- cgit v1.1