aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorSean McNamara2011-02-25 08:48:02 -0500
committerSean McNamara2011-02-25 08:48:02 -0500
commit7fa8ed0c47b3b0a5c87cd27b2620aeef05a7fe86 (patch)
tree9aefff5f3b6d662614d503976698ed91f74057b4 /OpenSim/Region
parentTry to fix config one more time. (diff)
downloadopensim-SC_OLD-7fa8ed0c47b3b0a5c87cd27b2620aeef05a7fe86.zip
opensim-SC_OLD-7fa8ed0c47b3b0a5c87cd27b2620aeef05a7fe86.tar.gz
opensim-SC_OLD-7fa8ed0c47b3b0a5c87cd27b2620aeef05a7fe86.tar.bz2
opensim-SC_OLD-7fa8ed0c47b3b0a5c87cd27b2620aeef05a7fe86.tar.xz
Config works, but timer isn't firing. Hmm.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
index 0869b0c..68c8301 100644
--- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
+++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
@@ -246,25 +246,26 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
246 { 246 {
247 //No config settings for any regions, let's just give up. 247 //No config settings for any regions, let's just give up.
248 st.SetEnabled(false); 248 st.SetEnabled(false);
249 m_log.Info("[AUTO BACKUP MODULE]: Region " + scene.RegionInfo.RegionName + " is NOT AutoBackup enabled."); 249 m_log.Info("[AUTO BACKUP MODULE]: Region " + sRegionName + " is NOT AutoBackup enabled.");
250 return; 250 return;
251 } 251 }
252 st.SetEnabled(config.GetBoolean(sRegionName + ".AutoBackup", false)); 252 st.SetEnabled(config.GetBoolean(sRegionName + ".AutoBackup", false));
253 if(!st.GetEnabled()) //If you don't want AutoBackup, we stop. 253 if(!st.GetEnabled()) //If you don't want AutoBackup, we stop.
254 { 254 {
255 m_log.Info("[AUTO BACKUP MODULE]: Region " + scene.RegionInfo.RegionName + " is NOT AutoBackup enabled."); 255 m_log.Info("[AUTO BACKUP MODULE]: Region " + sRegionName + " is NOT AutoBackup enabled.");
256 return; 256 return;
257 } 257 }
258 else 258 else
259 { 259 {
260 m_log.Info("[AUTO BACKUP MODULE]: Region " + scene.RegionInfo.RegionName + " is AutoBackup ENABLED."); 260 m_log.Info("[AUTO BACKUP MODULE]: Region " + sRegionName + " is AutoBackup ENABLED.");
261 } 261 }
262 262
263 //Borrow an existing timer if one exists for the same interval; otherwise, make a new one. 263 //Borrow an existing timer if one exists for the same interval; otherwise, make a new one.
264 double interval = config.GetDouble(sRegionName + ".AutoBackupInterval", 720); 264 double interval = config.GetDouble(sRegionName + ".AutoBackupInterval", 720) * 60000;
265 if(timers.ContainsKey(interval)) 265 if(timers.ContainsKey(interval))
266 { 266 {
267 st.SetTimer(timers[interval]); 267 st.SetTimer(timers[interval]);
268 m_log.Debug("[AUTO BACKUP MODULE]: Reusing timer for " + interval + " msec for region " + sRegionName);
268 } 269 }
269 else 270 else
270 { 271 {
@@ -274,9 +275,10 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
274 st.SetEnabled(false); 275 st.SetEnabled(false);
275 return; 276 return;
276 } 277 }
277 st.SetTimer(new Timer(interval * 60000)); //Milliseconds -> minutes 278 st.SetTimer(new Timer(interval)); //Milliseconds -> minutes
278 timers.Add(interval, st.GetTimer()); 279 timers.Add(interval, st.GetTimer());
279 st.GetTimer().Elapsed += HandleElapsed; 280 st.GetTimer().Elapsed += HandleElapsed;
281 m_log.Debug("[AUTO BACKUP MODULE]: New timer for " + interval + " msec for region " + sRegionName);
280 } 282 }
281 283
282 //Add the current region to the list of regions tied to this timer. 284 //Add the current region to the list of regions tied to this timer.