diff options
author | Diva Canto | 2009-08-21 11:00:45 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-21 11:00:45 -0700 |
commit | 33186527235091f95a7251ea66a713fdaee1c689 (patch) | |
tree | ddba8eb1bedf3243ef5767809e98f381bc615b93 /OpenSim/Services/Connectors/Inventory | |
parent | Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-33186527235091f95a7251ea66a713fdaee1c689.zip opensim-SC_OLD-33186527235091f95a7251ea66a713fdaee1c689.tar.gz opensim-SC_OLD-33186527235091f95a7251ea66a713fdaee1c689.tar.bz2 opensim-SC_OLD-33186527235091f95a7251ea66a713fdaee1c689.tar.xz |
Added a more sane InventoryServerMoveItemsHandler. Changed SynchronousRestObjectRequester so that it also understands PUTs.
Diffstat (limited to 'OpenSim/Services/Connectors/Inventory')
-rw-r--r-- | OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs index b573a06..7c35bde 100644 --- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs | |||
@@ -397,13 +397,28 @@ namespace OpenSim.Services.Connectors | |||
397 | 397 | ||
398 | private void MoveItemsAsync(string userID, List<InventoryItemBase> items, UUID sessionID) | 398 | private void MoveItemsAsync(string userID, List<InventoryItemBase> items, UUID sessionID) |
399 | { | 399 | { |
400 | if (items == null) | ||
401 | { | ||
402 | m_log.WarnFormat("[INVENTORY CONNECTOR]: request to move items got a null list."); | ||
403 | return; | ||
404 | } | ||
405 | |||
400 | try | 406 | try |
401 | { | 407 | { |
402 | SynchronousRestSessionObjectPoster<List<InventoryItemBase>, bool>.BeginPostObject( | 408 | //SynchronousRestSessionObjectPoster<List<InventoryItemBase>, bool>.BeginPostObject( |
403 | "POST", m_ServerURI + "/MoveItems/", items, sessionID.ToString(), userID.ToString()); | 409 | // "POST", m_ServerURI + "/MoveItems/", items, sessionID.ToString(), userID.ToString()); |
410 | |||
411 | //// Success | ||
412 | //return; | ||
413 | string uri = m_ServerURI + "/inventory/" + userID; | ||
414 | if (SynchronousRestObjectRequester. | ||
415 | MakeRequest<List<InventoryItemBase>, bool>("PUT", uri, items)) | ||
416 | m_log.DebugFormat("[INVENTORY CONNECTOR]: move {0} items poster succeeded {1}", items.Count, uri); | ||
417 | else | ||
418 | m_log.DebugFormat("[INVENTORY CONNECTOR]: move {0} items poster failed {1}", items.Count, uri); ; | ||
404 | 419 | ||
405 | // Success | ||
406 | return; | 420 | return; |
421 | |||
407 | } | 422 | } |
408 | catch (Exception e) | 423 | catch (Exception e) |
409 | { | 424 | { |