diff options
Diffstat (limited to 'OpenSim/Framework/RegionLoader/Web')
-rw-r--r-- | OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs index 8a1a038..76d0b34 100644 --- a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs +++ b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
35 | { | 35 | { |
36 | public class RegionLoaderWebServer : IRegionLoader | 36 | public class RegionLoaderWebServer : IRegionLoader |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | private IniConfigSource m_configSouce; | 40 | private IniConfigSource m_configSouce; |
39 | 41 | ||
40 | public void SetIniConfigSource(IniConfigSource configSource) | 42 | public void SetIniConfigSource(IniConfigSource configSource) |
@@ -46,7 +48,7 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
46 | { | 48 | { |
47 | if (m_configSouce == null) | 49 | if (m_configSouce == null) |
48 | { | 50 | { |
49 | MainLog.Instance.Error("WEBLOADER", "Unable to load configuration source!"); | 51 | m_log.Error("[WEBLOADER]: Unable to load configuration source!"); |
50 | return null; | 52 | return null; |
51 | } | 53 | } |
52 | else | 54 | else |
@@ -55,16 +57,16 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
55 | string url = startupConfig.GetString("regionload_webserver_url", System.String.Empty).Trim(); | 57 | string url = startupConfig.GetString("regionload_webserver_url", System.String.Empty).Trim(); |
56 | if (url == System.String.Empty) | 58 | if (url == System.String.Empty) |
57 | { | 59 | { |
58 | MainLog.Instance.Error("WEBLOADER", "Unable to load webserver URL - URL was empty."); | 60 | m_log.Error("[WEBLOADER]: Unable to load webserver URL - URL was empty."); |
59 | return null; | 61 | return null; |
60 | } | 62 | } |
61 | else | 63 | else |
62 | { | 64 | { |
63 | HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url); | 65 | HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url); |
64 | webRequest.Timeout = 30000; //30 Second Timeout | 66 | webRequest.Timeout = 30000; //30 Second Timeout |
65 | MainLog.Instance.Debug("WEBLOADER", "Sending Download Request..."); | 67 | m_log.Debug("[WEBLOADER]: Sending Download Request..."); |
66 | HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse(); | 68 | HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse(); |
67 | MainLog.Instance.Debug("WEBLOADER", "Downloading Region Information From Remote Server..."); | 69 | m_log.Debug("[WEBLOADER]: Downloading Region Information From Remote Server..."); |
68 | StreamReader reader = new StreamReader(webResponse.GetResponseStream()); | 70 | StreamReader reader = new StreamReader(webResponse.GetResponseStream()); |
69 | string xmlSource = System.String.Empty; | 71 | string xmlSource = System.String.Empty; |
70 | string tempStr = reader.ReadLine(); | 72 | string tempStr = reader.ReadLine(); |
@@ -73,9 +75,8 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
73 | xmlSource = xmlSource + tempStr; | 75 | xmlSource = xmlSource + tempStr; |
74 | tempStr = reader.ReadLine(); | 76 | tempStr = reader.ReadLine(); |
75 | } | 77 | } |
76 | MainLog.Instance.Debug("WEBLOADER", | 78 | m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " + |
77 | "Done downloading region information from server. Total Bytes: " + | 79 | xmlSource.Length); |
78 | xmlSource.Length); | ||
79 | XmlDocument xmlDoc = new XmlDocument(); | 80 | XmlDocument xmlDoc = new XmlDocument(); |
80 | xmlDoc.LoadXml(xmlSource); | 81 | xmlDoc.LoadXml(xmlSource); |
81 | if (xmlDoc.FirstChild.Name == "Regions") | 82 | if (xmlDoc.FirstChild.Name == "Regions") |
@@ -84,7 +85,7 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
84 | int i; | 85 | int i; |
85 | for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++) | 86 | for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++) |
86 | { | 87 | { |
87 | MainLog.Instance.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml); | 88 | m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml); |
88 | regionInfos[i] = | 89 | regionInfos[i] = |
89 | new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false); | 90 | new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false); |
90 | } | 91 | } |