aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-07 23:51:04 +0100
committerJustin Clark-Casey (justincc)2012-06-07 23:51:04 +0100
commit0c5fefacb415fb916ffece839c95c155ec718254 (patch)
treeca263bcd51dbe444b08ffaf7b6ea15c1c0bf2557 /OpenSim/Region/Framework
parentDon't send kill object messages to clients when a child agent is closed. (diff)
downloadopensim-SC_OLD-0c5fefacb415fb916ffece839c95c155ec718254.zip
opensim-SC_OLD-0c5fefacb415fb916ffece839c95c155ec718254.tar.gz
opensim-SC_OLD-0c5fefacb415fb916ffece839c95c155ec718254.tar.bz2
opensim-SC_OLD-0c5fefacb415fb916ffece839c95c155ec718254.tar.xz
Record the fact that child agents can have asset transactions.
Also change code to grab the agent asset transaction module once.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs29
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs12
2 files changed, 18 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 79c9309..b59fd05 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -440,10 +440,9 @@ namespace OpenSim.Region.Framework.Scenes
440 } 440 }
441 else 441 else
442 { 442 {
443 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); 443 if (AgentTransactionsModule != null)
444 if (agentTransactions != null)
445 { 444 {
446 agentTransactions.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); 445 AgentTransactionsModule.HandleItemUpdateFromTransaction(remoteClient, transactionID, item);
447 } 446 }
448 } 447 }
449 } 448 }
@@ -1532,21 +1531,17 @@ namespace OpenSim.Region.Framework.Scenes
1532 // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the 1531 // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the
1533 // case for updates uploded through UDP. Updates uploaded via a capability (e.g. a script update) 1532 // case for updates uploded through UDP. Updates uploaded via a capability (e.g. a script update)
1534 // will not pass in a transaction ID in the update message. 1533 // will not pass in a transaction ID in the update message.
1535 if (transactionID != UUID.Zero) 1534 if (transactionID != UUID.Zero && AgentTransactionsModule != null)
1536 { 1535 {
1537 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); 1536 AgentTransactionsModule.HandleTaskItemUpdateFromTransaction(
1538 if (agentTransactions != null) 1537 remoteClient, part, transactionID, currentItem);
1539 { 1538
1540 agentTransactions.HandleTaskItemUpdateFromTransaction( 1539 if ((InventoryType)itemInfo.InvType == InventoryType.Notecard)
1541 remoteClient, part, transactionID, currentItem); 1540 remoteClient.SendAgentAlertMessage("Notecard saved", false);
1542 1541 else if ((InventoryType)itemInfo.InvType == InventoryType.LSL)
1543 if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) 1542 remoteClient.SendAgentAlertMessage("Script saved", false);
1544 remoteClient.SendAgentAlertMessage("Notecard saved", false); 1543 else
1545 else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) 1544 remoteClient.SendAgentAlertMessage("Item saved", false);
1546 remoteClient.SendAgentAlertMessage("Script saved", false);
1547 else
1548 remoteClient.SendAgentAlertMessage("Item saved", false);
1549 }
1550 } 1545 }
1551 1546
1552 // Base ALWAYS has move 1547 // Base ALWAYS has move
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index f291022..939c8fa 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -499,6 +499,7 @@ namespace OpenSim.Region.Framework.Scenes
499 499
500 public IAttachmentsModule AttachmentsModule { get; set; } 500 public IAttachmentsModule AttachmentsModule { get; set; }
501 public IEntityTransferModule EntityTransferModule { get; private set; } 501 public IEntityTransferModule EntityTransferModule { get; private set; }
502 public IAgentAssetTransactions AgentTransactionsModule { get; private set; }
502 503
503 public IAvatarFactoryModule AvatarFactory 504 public IAvatarFactoryModule AvatarFactory
504 { 505 {
@@ -1241,6 +1242,7 @@ namespace OpenSim.Region.Framework.Scenes
1241 m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); 1242 m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
1242 EntityTransferModule = RequestModuleInterface<IEntityTransferModule>(); 1243 EntityTransferModule = RequestModuleInterface<IEntityTransferModule>();
1243 m_groupsModule = RequestModuleInterface<IGroupsModule>(); 1244 m_groupsModule = RequestModuleInterface<IGroupsModule>();
1245 AgentTransactionsModule = RequestModuleInterface<IAgentAssetTransactions>();
1244 } 1246 }
1245 1247
1246 #endregion 1248 #endregion
@@ -3297,12 +3299,10 @@ namespace OpenSim.Region.Framework.Scenes
3297 catch (NullReferenceException) { } 3299 catch (NullReferenceException) { }
3298 }); 3300 });
3299 } 3301 }
3300 3302
3301 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); 3303 // It's possible for child agents to have transactions if changes are being made cross-border.
3302 if (agentTransactions != null) 3304 if (AgentTransactionsModule != null)
3303 { 3305 AgentTransactionsModule.RemoveAgentAssetTransactions(agentID);
3304 agentTransactions.RemoveAgentAssetTransactions(agentID);
3305 }
3306 } 3306 }
3307 finally 3307 finally
3308 { 3308 {