From ca67ee60ac0e0c26d6d32fc68d48ef63570f034d Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Mon, 24 Sep 2012 21:22:08 +0100
Subject: add missing transactionID in SendInventoryItemCreateUpdate. and make
use of it on inventoryAccessModule, etc. Most likelly it's needs where there
is a transactionID not zero
---
OpenSim/Framework/IClientAPI.cs | 1 +
OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 8 +++++++-
.../InventoryAccess/InventoryAccessModule.cs | 2 +-
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 19 +++++++++++++++----
.../InternetRelayClientView/Server/IRCClientView.cs | 7 ++++++-
OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 4 ++++
OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++++
7 files changed, 38 insertions(+), 7 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 6be2bd7..5909ce1 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1158,6 +1158,7 @@ namespace OpenSim.Framework
///
///
void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId);
+ void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId);
void SendRemoveInventoryItem(UUID itemID);
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 7749ef3..ee28914 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -2067,9 +2067,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(bulkUpdate, ThrottleOutPacketType.Asset);
}
- /// IClientAPI.SendInventoryItemCreateUpdate(InventoryItemBase)
public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId)
{
+ SendInventoryItemCreateUpdate(Item, UUID.Zero, callbackId);
+ }
+
+ /// IClientAPI.SendInventoryItemCreateUpdate(InventoryItemBase)
+ public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId)
+ {
const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All;
UpdateCreateInventoryItemPacket InventoryReply
@@ -2079,6 +2084,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// TODO: don't create new blocks if recycling an old packet
InventoryReply.AgentData.AgentID = AgentId;
InventoryReply.AgentData.SimApproved = true;
+ InventoryReply.AgentData.TransactionID = transactionID;
InventoryReply.InventoryData = new UpdateCreateInventoryItemPacket.InventoryDataBlock[1];
InventoryReply.InventoryData[0] = new UpdateCreateInventoryItemPacket.InventoryDataBlock();
InventoryReply.InventoryData[0].ItemID = Item.ID;
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 305a818..50f5f68 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -216,7 +216,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
m_Scene.AssetService.Store(asset);
m_Scene.CreateNewInventoryItem(
remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID,
- name, description, 0, callbackID, asset, invType, nextOwnerMask, creationDate);
+ name, description, 0, callbackID, asset, invType, nextOwnerMask, creationDate,transactionID);
}
else
{
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 2d9a035..dd9210f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -904,11 +904,22 @@ namespace OpenSim.Region.Framework.Scenes
public void CreateNewInventoryItem(
IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID,
string name, string description, uint flags, uint callbackID,
- AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate)
+ AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate, UUID transationID)
{
CreateNewInventoryItem(
remoteClient, creatorID, creatorData, folderID, name, description, flags, callbackID, asset, invType,
- (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate);
+ (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate, transationID);
+ }
+
+
+ private void CreateNewInventoryItem(
+ IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID,
+ string name, string description, uint flags, uint callbackID, AssetBase asset, sbyte invType,
+ uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate)
+ {
+ CreateNewInventoryItem(remoteClient, creatorID, creatorData, folderID,
+ name, description, flags, callbackID, asset, invType,
+ baseMask, currentMask, everyoneMask, nextOwnerMask, groupMask, creationDate, UUID.Zero);
}
///
@@ -933,7 +944,7 @@ namespace OpenSim.Region.Framework.Scenes
private void CreateNewInventoryItem(
IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID,
string name, string description, uint flags, uint callbackID, AssetBase asset, sbyte invType,
- uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate)
+ uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate,UUID transationID)
{
InventoryItemBase item = new InventoryItemBase();
item.Owner = remoteClient.AgentId;
@@ -956,7 +967,7 @@ namespace OpenSim.Region.Framework.Scenes
if (AddInventoryItem(item))
{
- remoteClient.SendInventoryItemCreateUpdate(item, callbackID);
+ remoteClient.SendInventoryItemCreateUpdate(item, transationID, callbackID);
}
else
{
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 3b83e58..a484300 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1100,7 +1100,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId)
{
-
+
+ }
+
+ public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId)
+ {
+
}
public void SendRemoveInventoryItem(UUID itemID)
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index d00a6c0..7c693b6 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -739,6 +739,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{
}
+ public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId)
+ {
+ }
+
public virtual void SendRemoveInventoryItem(UUID itemID)
{
}
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 6add130..49a8d26 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -716,6 +716,10 @@ namespace OpenSim.Tests.Common.Mock
{
}
+ public void SendInventoryItemCreateUpdate(InventoryItemBase Item, UUID transactionID, uint callbackId)
+ {
+ }
+
public virtual void SendRemoveInventoryItem(UUID itemID)
{
}
--
cgit v1.1