mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 20:55:43 +08:00
add some missing using(...
This commit is contained in:
@@ -80,16 +80,18 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||
|
||||
try
|
||||
{
|
||||
HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
|
||||
m_log.Debug("[WEBLOADER]: Downloading region information...");
|
||||
StreamReader reader = new StreamReader(webResponse.GetResponseStream());
|
||||
string xmlSource = String.Empty;
|
||||
string tempStr = reader.ReadLine();
|
||||
while (tempStr != null)
|
||||
m_log.Debug("[WEBLOADER]: Downloading region information...");
|
||||
using (HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse())
|
||||
using (StreamReader reader = new StreamReader(webResponse.GetResponseStream()))
|
||||
{
|
||||
xmlSource = xmlSource + tempStr;
|
||||
tempStr = reader.ReadLine();
|
||||
string tempStr;
|
||||
while ((tempStr = reader.ReadLine()) != null)
|
||||
{
|
||||
xmlSource += tempStr;
|
||||
}
|
||||
}
|
||||
|
||||
m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " +
|
||||
xmlSource.Length);
|
||||
XmlDocument xmlDoc = new XmlDocument();
|
||||
|
||||
@@ -559,11 +559,13 @@ namespace OpenSim
|
||||
{
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
StreamReader readFile = File.OpenText(fileName);
|
||||
string currentLine;
|
||||
while ((currentLine = readFile.ReadLine()) != null)
|
||||
using(StreamReader readFile = File.OpenText(fileName))
|
||||
{
|
||||
m_log.Info("[!]" + currentLine);
|
||||
string currentLine;
|
||||
while ((currentLine = readFile.ReadLine()) != null)
|
||||
{
|
||||
m_log.Info("[!]" + currentLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,7 +353,6 @@ namespace OpenSim
|
||||
if (startupConfig == null || startupConfig.GetBoolean("JobEngineEnabled", true))
|
||||
WorkManager.JobEngine.Start();
|
||||
|
||||
|
||||
if(m_networkServersInfo.HttpUsesSSL)
|
||||
{
|
||||
m_httpServerSSL = true;
|
||||
@@ -449,6 +448,7 @@ namespace OpenSim
|
||||
Scene scene = SetupScene(regionInfo, proxyOffset, Config);
|
||||
|
||||
m_log.Info("[REGIONMODULES]: Loading Region's modules");
|
||||
|
||||
if (controller != null)
|
||||
controller.AddRegionToModules(scene);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user