aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/EntityTransfer
diff options
context:
space:
mode:
authorUbitUmarov2017-06-01 00:14:59 +0100
committerUbitUmarov2017-06-01 00:14:59 +0100
commitb920f784eae523af5b97825fc92bb61e8120cde3 (patch)
treed63faabbe3e7b78c335cbd9c824422bc23f5bf8b /OpenSim/Region/CoreModules/Framework/EntityTransfer
parentchange child agents close control; disablesimulator is not a caps event message (diff)
downloadopensim-SC-b920f784eae523af5b97825fc92bb61e8120cde3.zip
opensim-SC-b920f784eae523af5b97825fc92bb61e8120cde3.tar.gz
opensim-SC-b920f784eae523af5b97825fc92bb61e8120cde3.tar.bz2
opensim-SC-b920f784eae523af5b97825fc92bb61e8120cde3.tar.xz
avoi null refs on tests simple clients
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs22
1 files changed, 16 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index bcf4322..99bebdd 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -844,9 +844,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
844 844
845 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); 845 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
846 List<ulong> childRegionsToClose = sp.GetChildAgentsToClose(destinationHandle, finalDestination.RegionSizeX, finalDestination.RegionSizeY); 846 List<ulong> childRegionsToClose = sp.GetChildAgentsToClose(destinationHandle, finalDestination.RegionSizeX, finalDestination.RegionSizeY);
847 foreach(ulong handler in childRegionsToClose) 847 if(agentCircuit.ChildrenCapSeeds != null)
848 { 848 {
849 agentCircuit.ChildrenCapSeeds.Remove(handler); 849 foreach(ulong handler in childRegionsToClose)
850 {
851 agentCircuit.ChildrenCapSeeds.Remove(handler);
852 }
850 } 853 }
851 854
852 // Let's create an agent there if one doesn't exist yet. 855 // Let's create an agent there if one doesn't exist yet.
@@ -1084,9 +1087,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1084 ulong destinationHandle = finalDestination.RegionHandle; 1087 ulong destinationHandle = finalDestination.RegionHandle;
1085 1088
1086 List<ulong> childRegionsToClose = sp.GetChildAgentsToClose(destinationHandle, finalDestination.RegionSizeX, finalDestination.RegionSizeY); 1089 List<ulong> childRegionsToClose = sp.GetChildAgentsToClose(destinationHandle, finalDestination.RegionSizeX, finalDestination.RegionSizeY);
1087 foreach(ulong handler in childRegionsToClose) 1090
1091 if(agentCircuit.ChildrenCapSeeds != null)
1088 { 1092 {
1089 agentCircuit.ChildrenCapSeeds.Remove(handler); 1093 foreach(ulong handler in childRegionsToClose)
1094 {
1095 agentCircuit.ChildrenCapSeeds.Remove(handler);
1096 }
1090 } 1097 }
1091 1098
1092 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);; 1099 string capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);;
@@ -1763,8 +1770,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1763 cAgent.ChildrenCapSeeds = agent.KnownRegions; 1770 cAgent.ChildrenCapSeeds = agent.KnownRegions;
1764 1771
1765 childRegionsToClose = agent.GetChildAgentsToClose(neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY); 1772 childRegionsToClose = agent.GetChildAgentsToClose(neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY);
1766 foreach(ulong regh in childRegionsToClose) 1773 if(cAgent.ChildrenCapSeeds != null)
1767 cAgent.ChildrenCapSeeds.Remove(regh); 1774 {
1775 foreach(ulong regh in childRegionsToClose)
1776 cAgent.ChildrenCapSeeds.Remove(regh);
1777 }
1768 1778
1769 if (isFlying) 1779 if (isFlying)
1770 cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; 1780 cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;