aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs')
-rw-r--r--OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs22
1 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
index 5c4e7a9..742d1a0 100644
--- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
@@ -95,9 +95,9 @@ namespace OpenSim.Server.Handlers.Inventory
95 protected override byte[] ProcessRequest(string path, Stream requestData, 95 protected override byte[] ProcessRequest(string path, Stream requestData,
96 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 96 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
97 { 97 {
98 StreamReader sr = new StreamReader(requestData); 98 string body;
99 string body = sr.ReadToEnd(); 99 using(StreamReader sr = new StreamReader(requestData))
100 sr.Close(); 100 body = sr.ReadToEnd();
101 body = body.Trim(); 101 body = body.Trim();
102 102
103 //m_log.DebugFormat("[XXX]: query String: {0}", body); 103 //m_log.DebugFormat("[XXX]: query String: {0}", body);
@@ -293,7 +293,7 @@ namespace OpenSim.Server.Handlers.Inventory
293 result["FID"] = icoll.FolderID.ToString(); 293 result["FID"] = icoll.FolderID.ToString();
294 result["VERSION"] = icoll.Version.ToString(); 294 result["VERSION"] = icoll.Version.ToString();
295 Dictionary<string, object> folders = new Dictionary<string, object>(); 295 Dictionary<string, object> folders = new Dictionary<string, object>();
296 int i = 0; 296 int i = 0;
297 if (icoll.Folders != null) 297 if (icoll.Folders != null)
298 { 298 {
299 foreach (InventoryFolderBase f in icoll.Folders) 299 foreach (InventoryFolderBase f in icoll.Folders)
@@ -407,7 +407,7 @@ namespace OpenSim.Server.Handlers.Inventory
407 } 407 }
408 } 408 }
409 result["ITEMS"] = sitems; 409 result["ITEMS"] = sitems;
410 410
411 string xmlString = ServerUtils.BuildXmlResponse(result); 411 string xmlString = ServerUtils.BuildXmlResponse(result);
412 412
413 //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); 413 //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
@@ -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