aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Inventory
diff options
context:
space:
mode:
authorMelanie Thielker2016-07-04 03:35:48 +0100
committerMelanie Thielker2016-07-04 03:35:48 +0100
commitea8f3c83bf96453e8223d918933d5708fa49a3cc (patch)
tree288972a5d6f112426da2b5ab109fe18ba5aedc2e /OpenSim/Services/Connectors/Inventory
parentincrease xmlrpc timeout in xmlrpcgroups, disable its cache until its entries ... (diff)
downloadopensim-SC_OLD-ea8f3c83bf96453e8223d918933d5708fa49a3cc.zip
opensim-SC_OLD-ea8f3c83bf96453e8223d918933d5708fa49a3cc.tar.gz
opensim-SC_OLD-ea8f3c83bf96453e8223d918933d5708fa49a3cc.tar.bz2
opensim-SC_OLD-ea8f3c83bf96453e8223d918933d5708fa49a3cc.tar.xz
Finally remove the requirement for an InventoryItem/FolderBase object to
be passed into inventory queries. This makes the API more homogenous and also will more clearly show coding errors related to HG inventory where the .Owner field has a meaning for a query but wasn't always set.
Diffstat (limited to 'OpenSim/Services/Connectors/Inventory')
-rw-r--r--OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
index c7d658a..d80e660 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
@@ -520,10 +520,10 @@ namespace OpenSim.Services.Connectors
520 return CheckReturn(ret); 520 return CheckReturn(ret);
521 } 521 }
522 522
523 public InventoryItemBase GetItem(InventoryItemBase item) 523 public InventoryItemBase GetItem(UUID principalID, UUID itemID)
524 { 524 {
525 InventoryItemBase retrieved = null; 525 InventoryItemBase retrieved = null;
526 if (m_ItemCache.TryGetValue(item.ID, out retrieved)) 526 if (m_ItemCache.TryGetValue(itemID, out retrieved))
527 { 527 {
528 return retrieved; 528 return retrieved;
529 } 529 }
@@ -532,7 +532,8 @@ namespace OpenSim.Services.Connectors
532 { 532 {
533 Dictionary<string, object> ret = MakeRequest("GETITEM", 533 Dictionary<string, object> ret = MakeRequest("GETITEM",
534 new Dictionary<string, object> { 534 new Dictionary<string, object> {
535 { "ID", item.ID.ToString() } 535 { "ID", itemID.ToString() },
536 { "PRINCIPAL", principalID.ToString() }
536 }); 537 });
537 538
538 if (!CheckReturn(ret)) 539 if (!CheckReturn(ret))
@@ -545,7 +546,7 @@ namespace OpenSim.Services.Connectors
545 m_log.Error("[XINVENTORY SERVICES CONNECTOR]: Exception in GetItem: ", e); 546 m_log.Error("[XINVENTORY SERVICES CONNECTOR]: Exception in GetItem: ", e);
546 } 547 }
547 548
548 m_ItemCache.AddOrUpdate(item.ID, retrieved, CACHE_EXPIRATION_SECONDS); 549 m_ItemCache.AddOrUpdate(itemID, retrieved, CACHE_EXPIRATION_SECONDS);
549 550
550 return retrieved; 551 return retrieved;
551 } 552 }
@@ -613,13 +614,14 @@ namespace OpenSim.Services.Connectors
613 return itemArr; 614 return itemArr;
614 } 615 }
615 616
616 public InventoryFolderBase GetFolder(InventoryFolderBase folder) 617 public InventoryFolderBase GetFolder(UUID principalID, UUID folderID)
617 { 618 {
618 try 619 try
619 { 620 {
620 Dictionary<string, object> ret = MakeRequest("GETFOLDER", 621 Dictionary<string, object> ret = MakeRequest("GETFOLDER",
621 new Dictionary<string, object> { 622 new Dictionary<string, object> {
622 { "ID", folder.ID.ToString() } 623 { "ID", folderID.ToString() },
624 { "PRINCIPAL", principalID.ToString() }
623 }); 625 });
624 626
625 if (!CheckReturn(ret)) 627 if (!CheckReturn(ret))