aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server')
-rw-r--r--OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs18
-rw-r--r--OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs12
2 files changed, 22 insertions, 8 deletions
diff --git a/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs b/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs
index b295446..0bab5aa 100644
--- a/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs
@@ -114,12 +114,12 @@ namespace OpenSim.Server.Handlers.Inventory
114 "POST", "/DeleteItem/", DeleteItems, CheckAuthSession)); 114 "POST", "/DeleteItem/", DeleteItems, CheckAuthSession));
115 115
116 m_httpServer.AddStreamHandler( 116 m_httpServer.AddStreamHandler(
117 new RestDeserialiseSecureHandler<InventoryItemBase, InventoryItemBase>( 117 new RestDeserialiseSecureHandler<Guid, InventoryItemBase>(
118 "POST", "/QueryItem/", m_InventoryService.GetItem, CheckAuthSession)); 118 "POST", "/QueryItem/", GetItem, CheckAuthSession));
119 119
120 m_httpServer.AddStreamHandler( 120 m_httpServer.AddStreamHandler(
121 new RestDeserialiseSecureHandler<InventoryFolderBase, InventoryFolderBase>( 121 new RestDeserialiseSecureHandler<Guid, InventoryFolderBase>(
122 "POST", "/QueryFolder/", m_InventoryService.GetFolder, CheckAuthSession)); 122 "POST", "/QueryFolder/", GetFolder, CheckAuthSession));
123 123
124 m_httpServer.AddStreamHandler( 124 m_httpServer.AddStreamHandler(
125 new RestDeserialiseTrustedHandler<Guid, bool>( 125 new RestDeserialiseTrustedHandler<Guid, bool>(
@@ -205,6 +205,16 @@ namespace OpenSim.Server.Handlers.Inventory
205 return new Dictionary<AssetType, InventoryFolderBase>(); 205 return new Dictionary<AssetType, InventoryFolderBase>();
206 } 206 }
207 207
208 public InventoryItemBase GetItem(Guid guid)
209 {
210 return m_InventoryService.GetItem(UUID.Zero, new UUID(guid));
211 }
212
213 public InventoryFolderBase GetFolder(Guid guid)
214 {
215 return m_InventoryService.GetFolder(UUID.Zero, new UUID(guid));
216 }
217
208 public InventoryCollection GetFolderContent(Guid guid) 218 public InventoryCollection GetFolderContent(Guid guid)
209 { 219 {
210 return m_InventoryService.GetFolderContent(UUID.Zero, new UUID(guid)); 220 return m_InventoryService.GetFolderContent(UUID.Zero, new UUID(guid));
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
index 5c4e7a9..96d6451 100644
--- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
@@ -566,9 +566,11 @@ namespace OpenSim.Server.Handlers.Inventory
566 Dictionary<string,object> result = new Dictionary<string,object>(); 566 Dictionary<string,object> result = new Dictionary<string,object>();
567 UUID id = UUID.Zero; 567 UUID id = UUID.Zero;
568 UUID.TryParse(request["ID"].ToString(), out id); 568 UUID.TryParse(request["ID"].ToString(), out id);
569 UUID user = UUID.Zero;
570 if (request.ContainsKey("PRINCIPAL"))
571 UUID.TryParse(request["PRINCIPAL"].ToString(), out user);
569 572
570 InventoryItemBase item = new InventoryItemBase(id); 573 InventoryItemBase item = m_InventoryService.GetItem(user, id);
571 item = m_InventoryService.GetItem(item);
572 if (item != null) 574 if (item != null)
573 result["item"] = EncodeItem(item); 575 result["item"] = EncodeItem(item);
574 576
@@ -617,9 +619,11 @@ namespace OpenSim.Server.Handlers.Inventory
617 Dictionary<string, object> result = new Dictionary<string, object>(); 619 Dictionary<string, object> result = new Dictionary<string, object>();
618 UUID id = UUID.Zero; 620 UUID id = UUID.Zero;
619 UUID.TryParse(request["ID"].ToString(), out id); 621 UUID.TryParse(request["ID"].ToString(), out id);
622 UUID user = UUID.Zero;
623 if (request.ContainsKey("PRINCIPAL"))
624 UUID.TryParse(request["PRINCIPAL"].ToString(), out user);
620 625
621 InventoryFolderBase folder = new InventoryFolderBase(id); 626 InventoryFolderBase folder = m_InventoryService.GetFolder(user, id);
622 folder = m_InventoryService.GetFolder(folder);
623 if (folder != null) 627 if (folder != null)
624 result["folder"] = EncodeFolder(folder); 628 result["folder"] = EncodeFolder(folder);
625 629