Record the fact that child agents can have asset transactions.
Also change code to grab the agent asset transaction module once.0.7.4.1
parent
de87e4871b
commit
0c5fefacb4
|
@ -42,8 +42,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
public class AssetTransactionModule : INonSharedRegionModule,
|
public class AssetTransactionModule : INonSharedRegionModule,
|
||||||
IAgentAssetTransactions
|
IAgentAssetTransactions
|
||||||
{
|
{
|
||||||
// private static readonly ILog m_log = LogManager.GetLogger(
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
// MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
protected Scene m_Scene;
|
protected Scene m_Scene;
|
||||||
private bool m_dumpAssetsToFile = false;
|
private bool m_dumpAssetsToFile = false;
|
||||||
|
@ -209,15 +208,15 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
/// and comes through this method.
|
/// and comes through this method.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
|
/// <param name="part"></param>
|
||||||
/// <param name="transactionID"></param>
|
/// <param name="transactionID"></param>
|
||||||
/// <param name="item"></param>
|
/// <param name="item"></param>
|
||||||
public void HandleTaskItemUpdateFromTransaction(IClientAPI remoteClient,
|
public void HandleTaskItemUpdateFromTransaction(
|
||||||
SceneObjectPart part, UUID transactionID,
|
IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item)
|
||||||
TaskInventoryItem item)
|
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
// "[TRANSACTIONS MANAGER] Called HandleTaskItemUpdateFromTransaction with item {0}",
|
"[TRANSACTIONS MANAGER] Called HandleTaskItemUpdateFromTransaction with item {0} in {1} for {2} in {3}",
|
||||||
// item.Name);
|
item.Name, part.Name, remoteClient.Name, m_Scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
AgentAssetTransactions transactions =
|
AgentAssetTransactions transactions =
|
||||||
GetUserTransactions(remoteClient.AgentId);
|
GetUserTransactions(remoteClient.AgentId);
|
||||||
|
|
|
@ -216,7 +216,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IAgentAssetTransactions agentTransactions = m_Scene.RequestModuleInterface<IAgentAssetTransactions>();
|
IAgentAssetTransactions agentTransactions = m_Scene.AgentTransactionsModule;
|
||||||
if (agentTransactions != null)
|
if (agentTransactions != null)
|
||||||
{
|
{
|
||||||
agentTransactions.HandleItemCreationFromTransaction(
|
agentTransactions.HandleItemCreationFromTransaction(
|
||||||
|
|
|
@ -440,10 +440,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
|
if (AgentTransactionsModule != null)
|
||||||
if (agentTransactions != null)
|
|
||||||
{
|
{
|
||||||
agentTransactions.HandleItemUpdateFromTransaction(remoteClient, transactionID, item);
|
AgentTransactionsModule.HandleItemUpdateFromTransaction(remoteClient, transactionID, item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1532,12 +1531,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Only look for an uploaded updated asset if we are passed a transaction ID. This is only the
|
// Only look for an uploaded updated asset if we are passed a transaction ID. This is only the
|
||||||
// case for updates uploded through UDP. Updates uploaded via a capability (e.g. a script update)
|
// case for updates uploded through UDP. Updates uploaded via a capability (e.g. a script update)
|
||||||
// will not pass in a transaction ID in the update message.
|
// will not pass in a transaction ID in the update message.
|
||||||
if (transactionID != UUID.Zero)
|
if (transactionID != UUID.Zero && AgentTransactionsModule != null)
|
||||||
{
|
{
|
||||||
IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
|
AgentTransactionsModule.HandleTaskItemUpdateFromTransaction(
|
||||||
if (agentTransactions != null)
|
|
||||||
{
|
|
||||||
agentTransactions.HandleTaskItemUpdateFromTransaction(
|
|
||||||
remoteClient, part, transactionID, currentItem);
|
remoteClient, part, transactionID, currentItem);
|
||||||
|
|
||||||
if ((InventoryType)itemInfo.InvType == InventoryType.Notecard)
|
if ((InventoryType)itemInfo.InvType == InventoryType.Notecard)
|
||||||
|
@ -1547,7 +1543,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
else
|
else
|
||||||
remoteClient.SendAgentAlertMessage("Item saved", false);
|
remoteClient.SendAgentAlertMessage("Item saved", false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Base ALWAYS has move
|
// Base ALWAYS has move
|
||||||
currentItem.BasePermissions |= (uint)PermissionMask.Move;
|
currentItem.BasePermissions |= (uint)PermissionMask.Move;
|
||||||
|
|
|
@ -499,6 +499,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public IAttachmentsModule AttachmentsModule { get; set; }
|
public IAttachmentsModule AttachmentsModule { get; set; }
|
||||||
public IEntityTransferModule EntityTransferModule { get; private set; }
|
public IEntityTransferModule EntityTransferModule { get; private set; }
|
||||||
|
public IAgentAssetTransactions AgentTransactionsModule { get; private set; }
|
||||||
|
|
||||||
public IAvatarFactoryModule AvatarFactory
|
public IAvatarFactoryModule AvatarFactory
|
||||||
{
|
{
|
||||||
|
@ -1241,6 +1242,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
|
m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
|
||||||
EntityTransferModule = RequestModuleInterface<IEntityTransferModule>();
|
EntityTransferModule = RequestModuleInterface<IEntityTransferModule>();
|
||||||
m_groupsModule = RequestModuleInterface<IGroupsModule>();
|
m_groupsModule = RequestModuleInterface<IGroupsModule>();
|
||||||
|
AgentTransactionsModule = RequestModuleInterface<IAgentAssetTransactions>();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -3298,11 +3300,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
|
// It's possible for child agents to have transactions if changes are being made cross-border.
|
||||||
if (agentTransactions != null)
|
if (AgentTransactionsModule != null)
|
||||||
{
|
AgentTransactionsModule.RemoveAgentAssetTransactions(agentID);
|
||||||
agentTransactions.RemoveAgentAssetTransactions(agentID);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue