diff options
author | Diva Canto | 2009-08-19 10:56:08 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-19 10:56:08 -0700 |
commit | d519f1885f587409592cf92bc0f4ba8533a1866f (patch) | |
tree | dc8d0073d09050c8787121290b1e3a8f65119812 /OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |
parent | Async purge so that the client thread doesn't wait. (diff) | |
download | opensim-SC_OLD-d519f1885f587409592cf92bc0f4ba8533a1866f.zip opensim-SC_OLD-d519f1885f587409592cf92bc0f4ba8533a1866f.tar.gz opensim-SC_OLD-d519f1885f587409592cf92bc0f4ba8533a1866f.tar.bz2 opensim-SC_OLD-d519f1885f587409592cf92bc0f4ba8533a1866f.tar.xz |
Added MoveItems, which is most useful upon viewer-delete inventory operation. Moving a batch of items is a 1-time operation. Made it async anyway, so that the viewer doesn't wait in case the DB layer is dumb (which is the case currently).
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index 6a1f2d5..787c6c8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -393,6 +393,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
393 | } | 393 | } |
394 | } | 394 | } |
395 | 395 | ||
396 | public override bool MoveItems(UUID ownerID, List<InventoryItemBase> items) | ||
397 | { | ||
398 | if (items == null) | ||
399 | return false; | ||
400 | if (items.Count == 0) | ||
401 | return true; | ||
402 | |||
403 | if (IsLocalGridUser(ownerID)) | ||
404 | return m_GridService.MoveItems(ownerID, items); | ||
405 | else | ||
406 | { | ||
407 | UUID sessionID = GetSessionID(ownerID); | ||
408 | string uri = GetUserInventoryURI(ownerID) + "/" + ownerID.ToString(); | ||
409 | return m_HGService.MoveItems(uri, items, sessionID); | ||
410 | } | ||
411 | } | ||
412 | |||
396 | public override bool DeleteItems(UUID ownerID, List<UUID> itemIDs) | 413 | public override bool DeleteItems(UUID ownerID, List<UUID> itemIDs) |
397 | { | 414 | { |
398 | m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Delete {0} items for user {1}", itemIDs.Count, ownerID); | 415 | m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Delete {0} items for user {1}", itemIDs.Count, ownerID); |