diff options
author | Teravus Ovares (Dan Olivares) | 2009-08-25 16:13:02 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-25 16:13:02 -0400 |
commit | a7917b428a6bc3c9e33da64879b9e473516540a3 (patch) | |
tree | 2c38d9c33c4977a3d0356912915082a8bd568a23 /OpenSim/Region/CoreModules/Avatar/Inventory | |
parent | Patch from jhurliman to HttpServer (diff) | |
parent | Implemented osPenCap, that sets EndCap and StartCap to Pen. This allows using... (diff) | |
download | opensim-SC_OLD-a7917b428a6bc3c9e33da64879b9e473516540a3.zip opensim-SC_OLD-a7917b428a6bc3c9e33da64879b9e473516540a3.tar.gz opensim-SC_OLD-a7917b428a6bc3c9e33da64879b9e473516540a3.tar.bz2 opensim-SC_OLD-a7917b428a6bc3c9e33da64879b9e473516540a3.tar.xz |
Merge branch 'master' of ssh://MyConnection/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 5315c11..75976e2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -67,13 +67,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
67 | 67 | ||
68 | if (!m_Scenelist.Contains(scene)) | 68 | if (!m_Scenelist.Contains(scene)) |
69 | { | 69 | { |
70 | if (m_Scenelist.Count == 0) | ||
71 | { | ||
72 | m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>(); | ||
73 | if (m_TransferModule == null) | ||
74 | m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only"); | ||
75 | } | ||
76 | |||
77 | m_Scenelist.Add(scene); | 70 | m_Scenelist.Add(scene); |
78 | 71 | ||
79 | scene.RegisterModuleInterface<IInventoryTransferModule>(this); | 72 | scene.RegisterModuleInterface<IInventoryTransferModule>(this); |
@@ -86,6 +79,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
86 | 79 | ||
87 | public void PostInitialise() | 80 | public void PostInitialise() |
88 | { | 81 | { |
82 | if (m_Scenelist.Count > 0) | ||
83 | { | ||
84 | m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>(); | ||
85 | if (m_TransferModule == null) | ||
86 | m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only"); | ||
87 | } | ||
89 | } | 88 | } |
90 | 89 | ||
91 | public void Close() | 90 | public void Close() |
@@ -257,8 +256,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
257 | invService.GetFolderForType(client.AgentId, AssetType.TrashFolder); | 256 | invService.GetFolderForType(client.AgentId, AssetType.TrashFolder); |
258 | 257 | ||
259 | UUID inventoryEntityID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip | 258 | UUID inventoryEntityID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip |
260 | 259 | ||
261 | InventoryItemBase item = invService.GetItem(new InventoryItemBase(inventoryEntityID)); | 260 | InventoryItemBase item = new InventoryItemBase(inventoryEntityID, client.AgentId); |
261 | item = invService.GetItem(item); | ||
262 | InventoryFolderBase folder = null; | 262 | InventoryFolderBase folder = null; |
263 | 263 | ||
264 | if (item != null && trashFolder != null) | 264 | if (item != null && trashFolder != null) |
@@ -266,12 +266,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
266 | item.Folder = trashFolder.ID; | 266 | item.Folder = trashFolder.ID; |
267 | 267 | ||
268 | // Diva comment: can't we just update this item??? | 268 | // Diva comment: can't we just update this item??? |
269 | invService.DeleteItem(item); | 269 | List<UUID> uuids = new List<UUID>(); |
270 | uuids.Add(item.ID); | ||
271 | invService.DeleteItems(item.Owner, uuids); | ||
270 | scene.AddInventoryItem(client, item); | 272 | scene.AddInventoryItem(client, item); |
271 | } | 273 | } |
272 | else | 274 | else |
273 | { | 275 | { |
274 | folder = invService.GetFolder(new InventoryFolderBase(inventoryEntityID)); | 276 | folder = new InventoryFolderBase(inventoryEntityID, client.AgentId); |
277 | folder = invService.GetFolder(folder); | ||
275 | 278 | ||
276 | if (folder != null & trashFolder != null) | 279 | if (folder != null & trashFolder != null) |
277 | { | 280 | { |
@@ -451,10 +454,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
451 | else | 454 | else |
452 | { | 455 | { |
453 | UUID itemID = new UUID(msg.binaryBucket, 1); | 456 | UUID itemID = new UUID(msg.binaryBucket, 1); |
454 | InventoryItemBase item = new InventoryItemBase(); | 457 | InventoryItemBase item = new InventoryItemBase(itemID, user.ControllingClient.AgentId); |
455 | |||
456 | item.ID = itemID; | ||
457 | item.Owner = user.ControllingClient.AgentId; | ||
458 | 458 | ||
459 | // Fetch from service | 459 | // Fetch from service |
460 | // | 460 | // |