aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/LoadRegions
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-05-03 18:48:50 +0100
committerJustin Clark-Casey (justincc)2013-05-03 18:48:50 +0100
commit304c5d4a8b8a1137bac18f7f6443ea85cec86184 (patch)
tree33833264d210694546b17447a5f42f010084b0ad /OpenSim/ApplicationPlugins/LoadRegions
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-304c5d4a8b8a1137bac18f7f6443ea85cec86184.zip
opensim-SC_OLD-304c5d4a8b8a1137bac18f7f6443ea85cec86184.tar.gz
opensim-SC_OLD-304c5d4a8b8a1137bac18f7f6443ea85cec86184.tar.bz2
opensim-SC_OLD-304c5d4a8b8a1137bac18f7f6443ea85cec86184.tar.xz
On startup, start scenes after we're set up all local scenes, rather than starting scenes before others have been created.
This aims to avoid a race condition where scenes could look to inform neighbours that they were up before those neighbours had been created. http://opensimulator.org/mantis/view.php?id=6618
Diffstat (limited to 'OpenSim/ApplicationPlugins/LoadRegions')
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs23
1 files changed, 15 insertions, 8 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
index fcb6991..1d63d26 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
@@ -115,6 +115,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
115 Environment.Exit(1); 115 Environment.Exit(1);
116 } 116 }
117 117
118 List<IScene> createdScenes = new List<IScene>();
119
118 for (int i = 0; i < regionsToLoad.Length; i++) 120 for (int i = 0; i < regionsToLoad.Length; i++)
119 { 121 {
120 IScene scene; 122 IScene scene;
@@ -123,17 +125,22 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
123 ")"); 125 ")");
124 126
125 bool changed = m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]); 127 bool changed = m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]);
128
126 m_openSim.CreateRegion(regionsToLoad[i], true, out scene); 129 m_openSim.CreateRegion(regionsToLoad[i], true, out scene);
130 createdScenes.Add(scene);
131
127 if (changed) 132 if (changed)
128 regionsToLoad[i].EstateSettings.Save(); 133 regionsToLoad[i].EstateSettings.Save();
129 134 }
130 if (scene != null) 135
136 foreach (IScene scene in createdScenes)
137 {
138 scene.Start();
139
140 m_newRegionCreatedHandler = OnNewRegionCreated;
141 if (m_newRegionCreatedHandler != null)
131 { 142 {
132 m_newRegionCreatedHandler = OnNewRegionCreated; 143 m_newRegionCreatedHandler(scene);
133 if (m_newRegionCreatedHandler != null)
134 {
135 m_newRegionCreatedHandler(scene);
136 }
137 } 144 }
138 } 145 }
139 } 146 }