aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Communications/Hypergrid/HGInventoryService.cs23
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs16
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1SecureInventoryService.cs16
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs33
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs7
5 files changed, 93 insertions, 2 deletions
diff --git a/OpenSim/Region/Communications/Hypergrid/HGInventoryService.cs b/OpenSim/Region/Communications/Hypergrid/HGInventoryService.cs
index 9d70c46..a9e008c 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGInventoryService.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGInventoryService.cs
@@ -340,6 +340,29 @@ namespace OpenSim.Region.Communications.Hypergrid
340 340
341 return null; 341 return null;
342 } 342 }
343
344 public InventoryFolderBase QueryFolder(InventoryFolderBase item, UUID session_id)
345 {
346 if (IsLocalStandaloneUser(item.Owner))
347 {
348 return base.QueryFolder(item);
349 }
350
351 try
352 {
353 string invServ = GetUserInventoryURI(item.Owner);
354
355 return SynchronousRestSessionObjectPoster<InventoryFolderBase, InventoryFolderBase>.BeginPostObject(
356 "POST", invServ + "/QueryFolder/", item, session_id.ToString(), item.Owner.ToString());
357 }
358 catch (WebException e)
359 {
360 m_log.ErrorFormat("[HGrid INVENTORY SERVICE]: Query inventory item operation failed, {0} {1}",
361 e.Source, e.Message);
362 }
363
364 return null;
365 }
343 #endregion 366 #endregion
344 367
345 #region Methods common to ISecureInventoryService and IInventoryService 368 #region Methods common to ISecureInventoryService and IInventoryService
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
index 56566a8..26e4a55 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
@@ -312,6 +312,22 @@ namespace OpenSim.Region.Communications.OGS1
312 return null; 312 return null;
313 } 313 }
314 314
315 public InventoryFolderBase QueryFolder(InventoryFolderBase item)
316 {
317 try
318 {
319 return SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, InventoryFolderBase>(
320 "POST", _inventoryServerUrl + "/QueryFolder/", item);
321 }
322 catch (WebException e)
323 {
324 m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Query inventory item operation failed, {0} {1}",
325 e.Source, e.Message);
326 }
327
328 return null;
329 }
330
315 public bool HasInventoryForUser(UUID userID) 331 public bool HasInventoryForUser(UUID userID)
316 { 332 {
317 return false; 333 return false;
diff --git a/OpenSim/Region/Communications/OGS1/OGS1SecureInventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1SecureInventoryService.cs
index 0f50b01..03fb0d5 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1SecureInventoryService.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1SecureInventoryService.cs
@@ -312,6 +312,22 @@ namespace OpenSim.Region.Communications.OGS1
312 return null; 312 return null;
313 } 313 }
314 314
315 public InventoryFolderBase QueryFolder(InventoryFolderBase item, UUID session_id)
316 {
317 try
318 {
319 return SynchronousRestSessionObjectPoster<InventoryFolderBase, InventoryFolderBase>.BeginPostObject(
320 "POST", _inventoryServerUrl + "/QueryFolder/", item, session_id.ToString(), item.Owner.ToString());
321 }
322 catch (WebException e)
323 {
324 m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Query inventory item operation failed, {0} {1}",
325 e.Source, e.Message);
326 }
327
328 return null;
329 }
330
315 public bool HasInventoryForUser(UUID userID) 331 public bool HasInventoryForUser(UUID userID)
316 { 332 {
317 return false; 333 return false;
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 465167a..19b9b22 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -426,9 +426,38 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
426 426
427 if (AssetType.Folder == assetType) 427 if (AssetType.Folder == assetType)
428 { 428 {
429 // Folders not implemented yet 429 UUID folderID = new UUID(msg.binaryBucket, 1);
430 InventoryFolderBase folder = new InventoryFolderBase();
431
432 folder.ID = folderID;
433 folder.Owner = user.ControllingClient.AgentId;
434
435 // Fetch from database
430 // 436 //
431 return; 437 if (!userInfo.QueryFolder(folder))
438 {
439 m_log.Debug("[INVENTORY TRANSFER] Can't find folder to give");
440 return;
441 }
442
443 // Get folder info
444 //
445 InventoryFolderImpl folderInfo = userInfo.RootFolder.FindFolder(folder.ID);
446 if (folderInfo == null)
447 {
448 m_log.Debug("[INVENTORY TRANSFER] Can't retrieve folder to give");
449 return;
450 }
451
452 user.ControllingClient.SendBulkUpdateInventory(folderInfo);
453
454 // Deliver message
455 //
456 user.ControllingClient.SendInstantMessage(
457 new UUID(msg.fromAgentID), msg.message,
458 new UUID(msg.toAgentID),
459 msg.fromAgentName, msg.dialog, msg.timestamp,
460 folderID, false, msg.binaryBucket);
432 } 461 }
433 else 462 else
434 { 463 {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 9528114..d129b93 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -618,6 +618,13 @@ namespace OpenSim.Region.Framework.Scenes
618 return null; 618 return null;
619 } 619 }
620 620
621 if (!recipientUserInfo.HasReceivedInventory)
622 {
623 recipientUserInfo.FetchInventory();
624 if (!WaitForInventory(recipientUserInfo))
625 return null;
626 }
627
621 if (recipientParentFolderId == UUID.Zero) 628 if (recipientParentFolderId == UUID.Zero)
622 recipientParentFolderId = recipientUserInfo.RootFolder.ID; 629 recipientParentFolderId = recipientUserInfo.RootFolder.ID;
623 630