aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSim.cs
diff options
context:
space:
mode:
authorMelanie2009-09-11 21:52:49 +0100
committerMelanie2009-09-11 21:52:49 +0100
commit496b36833425a32e3b720fc79757645be504680e (patch)
tree5febe158f7e03ff30fa8e80dabbc30e50698d2ea /OpenSim/Region/Application/OpenSim.cs
parentAdded GetRegionByHandle. (diff)
downloadopensim-SC-496b36833425a32e3b720fc79757645be504680e.zip
opensim-SC-496b36833425a32e3b720fc79757645be504680e.tar.gz
opensim-SC-496b36833425a32e3b720fc79757645be504680e.tar.bz2
opensim-SC-496b36833425a32e3b720fc79757645be504680e.tar.xz
Add a using() block around the timer script
Diffstat (limited to 'OpenSim/Region/Application/OpenSim.cs')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index e6ddb5b..10071a0 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -423,14 +423,16 @@ namespace OpenSim
423 { 423 {
424 m_log.Info("[COMMANDFILE]: Running " + fileName); 424 m_log.Info("[COMMANDFILE]: Running " + fileName);
425 425
426 StreamReader readFile = File.OpenText(fileName); 426 using (StreamReader readFile = File.OpenText(fileName))
427 string currentCommand;
428 while ((currentCommand = readFile.ReadLine()) != null)
429 { 427 {
430 if (currentCommand != String.Empty) 428 string currentCommand;
429 while ((currentCommand = readFile.ReadLine()) != null)
431 { 430 {
432 m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'"); 431 if (currentCommand != String.Empty)
433 m_console.RunCommand(currentCommand); 432 {
433 m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'");
434 m_console.RunCommand(currentCommand);
435 }
434 } 436 }
435 } 437 }
436 } 438 }