diff options
author | Charles Krinke | 2008-05-17 21:05:08 +0000 |
---|---|---|
committer | Charles Krinke | 2008-05-17 21:05:08 +0000 |
commit | 4fde2e602c90b160e63fc08cd13db83691c99a92 (patch) | |
tree | 6919e77caa36b8fc225ef121ea3b603f6a88d96b /OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | |
parent | * whoops, misplaced / where should have been \ (diff) | |
download | opensim-SC-4fde2e602c90b160e63fc08cd13db83691c99a92.zip opensim-SC-4fde2e602c90b160e63fc08cd13db83691c99a92.tar.gz opensim-SC-4fde2e602c90b160e63fc08cd13db83691c99a92.tar.bz2 opensim-SC-4fde2e602c90b160e63fc08cd13db83691c99a92.tar.xz |
Thank you kindly, KMeisthax for: Moving the PostInitialize() code to the
Initialize() section that runs when the module is grabbing config data.
This is run before any Providers are created and thus makes sure we don't
get any more startup crashes.
Diffstat (limited to 'OpenSim/Region/DataSnapshot/DataSnapshotManager.cs')
-rw-r--r-- | OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 6fdedb4..ae0b5ff 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | |||
@@ -130,7 +130,30 @@ namespace OpenSim.Region.DataSnapshot | |||
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
133 | m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname); | 133 | if (m_enabled) |
134 | { | ||
135 | //Create update timer | ||
136 | m_periodic = new Timer(); | ||
137 | m_periodic.Interval = m_period * 1000; | ||
138 | m_periodic.Elapsed += SnapshotTimerCallback; | ||
139 | |||
140 | //Create update eligibility timer | ||
141 | m_passedCheck = new Timer(); | ||
142 | m_passedCheck.Interval = m_period * 1000; | ||
143 | m_passedCheck.Elapsed += UpdateEligibilityCallback; | ||
144 | m_passedCheck.Start(); | ||
145 | |||
146 | //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer | ||
147 | m_requests = new DataRequestHandler(scene, this); | ||
148 | |||
149 | m_hostname = scene.RegionInfo.ExternalHostName; | ||
150 | m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname); | ||
151 | |||
152 | MakeEverythingStale(); | ||
153 | |||
154 | if (m_dataServices != "noservices") | ||
155 | NotifyDataServices(m_dataServices); | ||
156 | } | ||
134 | } | 157 | } |
135 | 158 | ||
136 | if (m_enabled) | 159 | if (m_enabled) |
@@ -184,30 +207,7 @@ namespace OpenSim.Region.DataSnapshot | |||
184 | 207 | ||
185 | public void PostInitialise() | 208 | public void PostInitialise() |
186 | { | 209 | { |
187 | if (m_enabled) | ||
188 | { | ||
189 | //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer | ||
190 | m_requests = new DataRequestHandler(m_scenes[0], this); | ||
191 | |||
192 | //Create update timer | ||
193 | m_periodic = new Timer(); | ||
194 | m_periodic.Interval = m_period * 1000; | ||
195 | m_periodic.Elapsed += SnapshotTimerCallback; | ||
196 | |||
197 | //Create update eligibility timer | ||
198 | m_passedCheck = new Timer(); | ||
199 | m_passedCheck.Interval = m_period * 1000; | ||
200 | m_passedCheck.Elapsed += UpdateEligibilityCallback; | ||
201 | m_passedCheck.Start(); | ||
202 | 210 | ||
203 | m_hostname = m_scenes[0].RegionInfo.ExternalHostName; | ||
204 | |||
205 | //m_snapStore = new SnapshotStore(m_snapsDir, m_dataproviders, m_gridinfo, m_listener_port, m_hostname); | ||
206 | MakeEverythingStale(); | ||
207 | |||
208 | if (m_dataServices != "noservices") | ||
209 | NotifyDataServices(m_dataServices); | ||
210 | } | ||
211 | } | 211 | } |
212 | 212 | ||
213 | #endregion | 213 | #endregion |