aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/RegionLoader
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-11-03 21:44:39 +1000
committerDavid Walter Seikel2016-11-03 21:44:39 +1000
commit134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch)
tree216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Framework/RegionLoader
parentMore changing to production grid. Double oops. (diff)
downloadopensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2
opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs (renamed from OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs)3
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs (renamed from OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs)44
-rw-r--r--OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs33
-rw-r--r--OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs33
4 files changed, 33 insertions, 80 deletions
diff --git a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs
index 8332c14..1873a06 100644
--- a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs
@@ -31,8 +31,9 @@ using System.Collections.Generic;
31using System.IO; 31using System.IO;
32using System.Reflection; 32using System.Reflection;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework;
34 35
35namespace OpenSim.Framework.RegionLoader.Filesystem 36namespace OpenSim.ApplicationPlugins.LoadRegions
36{ 37{
37 public class RegionLoaderFileSystem : IRegionLoader 38 public class RegionLoaderFileSystem : IRegionLoader
38 { 39 {
diff --git a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs
index a2f5d9c..850f3e0 100644
--- a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs
@@ -32,8 +32,9 @@ using System.Reflection;
32using System.Xml; 32using System.Xml;
33using log4net; 33using log4net;
34using Nini.Config; 34using Nini.Config;
35using OpenSim.Framework;
35 36
36namespace OpenSim.Framework.RegionLoader.Web 37namespace OpenSim.ApplicationPlugins.LoadRegions
37{ 38{
38 public class RegionLoaderWebServer : IRegionLoader 39 public class RegionLoaderWebServer : IRegionLoader
39 { 40 {
@@ -74,21 +75,31 @@ namespace OpenSim.Framework.RegionLoader.Web
74 75
75 try 76 try
76 { 77 {
77 HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();
78 m_log.Debug("[WEBLOADER]: Downloading region information...");
79 StreamReader reader = new StreamReader(webResponse.GetResponseStream());
80 string xmlSource = String.Empty; 78 string xmlSource = String.Empty;
81 string tempStr = reader.ReadLine(); 79
82 while (tempStr != null) 80 using (HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse())
83 { 81 {
84 xmlSource = xmlSource + tempStr; 82 m_log.Debug("[WEBLOADER]: Downloading region information...");
85 tempStr = reader.ReadLine(); 83
84 using (Stream s = webResponse.GetResponseStream())
85 {
86 using (StreamReader reader = new StreamReader(s))
87 {
88 string tempStr = reader.ReadLine();
89 while (tempStr != null)
90 {
91 xmlSource = xmlSource + tempStr;
92 tempStr = reader.ReadLine();
93 }
94 }
95 }
86 } 96 }
97
87 m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " + 98 m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " +
88 xmlSource.Length); 99 xmlSource.Length);
89 XmlDocument xmlDoc = new XmlDocument(); 100 XmlDocument xmlDoc = new XmlDocument();
90 xmlDoc.LoadXml(xmlSource); 101 xmlDoc.LoadXml(xmlSource);
91 if (xmlDoc.FirstChild.Name == "Regions") 102 if (xmlDoc.FirstChild.Name == "Nini")
92 { 103 {
93 regionCount = xmlDoc.FirstChild.ChildNodes.Count; 104 regionCount = xmlDoc.FirstChild.ChildNodes.Count;
94 105
@@ -107,17 +118,24 @@ namespace OpenSim.Framework.RegionLoader.Web
107 } 118 }
108 catch (WebException ex) 119 catch (WebException ex)
109 { 120 {
110 if (((HttpWebResponse)ex.Response).StatusCode == HttpStatusCode.NotFound) 121 using (HttpWebResponse response = (HttpWebResponse)ex.Response)
111 { 122 {
112 if (!allowRegionless) 123 if (response.StatusCode == HttpStatusCode.NotFound)
124 {
125 if (!allowRegionless)
126 throw ex;
127 }
128 else
129 {
113 throw ex; 130 throw ex;
131 }
114 } 132 }
115 else
116 throw ex;
117 } 133 }
118 134
119 if (regionCount > 0 | allowRegionless) 135 if (regionCount > 0 | allowRegionless)
136 {
120 return regionInfos; 137 return regionInfos;
138 }
121 else 139 else
122 { 140 {
123 m_log.Error("[WEBLOADER]: No region configs were available."); 141 m_log.Error("[WEBLOADER]: No region configs were available.");
diff --git a/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs b/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs
deleted file mode 100644
index d670f2f..0000000
--- a/OpenSim/Framework/RegionLoader/Filesystem/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Framework.RegionLoader.Filesystem")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("http://opensimulator.org")]
12[assembly: AssemblyProduct("OpenSim")]
13[assembly: AssemblyCopyright("OpenSimulator developers")]
14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")]
16
17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)]
21
22// The following GUID is for the ID of the typelib if this project is exposed to COM
23[assembly: Guid("4ab5c74b-e886-40a1-b67d-a04df285e706")]
24
25// Version information for an assembly consists of the following four values:
26//
27// Major Version
28// Minor Version
29// Build Number
30// Revision
31//
32[assembly: AssemblyVersion("0.7.5.*")]
33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs b/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs
deleted file mode 100644
index 7309a12..0000000
--- a/OpenSim/Framework/RegionLoader/Web/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Framework.RegionLoader.Web")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("http://opensimulator.org")]
12[assembly: AssemblyProduct("OpenSim")]
13[assembly: AssemblyCopyright("OpenSimulator developers")]
14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")]
16
17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)]
21
22// The following GUID is for the ID of the typelib if this project is exposed to COM
23[assembly: Guid("985afff8-e7ed-4056-acce-39abf7a43d33")]
24
25// Version information for an assembly consists of the following four values:
26//
27// Major Version
28// Minor Version
29// Build Number
30// Revision
31//
32[assembly: AssemblyVersion("0.7.5.*")]
33[assembly: AssemblyFileVersion("1.0.0.0")]