aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/RegionLoader
diff options
context:
space:
mode:
authorMelanie Thielker2009-01-02 17:41:12 +0000
committerMelanie Thielker2009-01-02 17:41:12 +0000
commit0138fdc5fddbe30924484686716465984e8f59c2 (patch)
tree3d734b2f626db149b14d945b424ece36e654673a /OpenSim/Framework/RegionLoader
parentUse only one (static) (de-)serializer for (de-)serializing SOPs. (diff)
downloadopensim-SC-0138fdc5fddbe30924484686716465984e8f59c2.zip
opensim-SC-0138fdc5fddbe30924484686716465984e8f59c2.tar.gz
opensim-SC-0138fdc5fddbe30924484686716465984e8f59c2.tar.bz2
opensim-SC-0138fdc5fddbe30924484686716465984e8f59c2.tar.xz
Allow some values that are set in OpenSim.ini to be set from region config
XML as well.
Diffstat (limited to 'OpenSim/Framework/RegionLoader')
-rw-r--r--OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs4
-rw-r--r--OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs10
2 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
index a371851..05ccc4d 100644
--- a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
+++ b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
@@ -63,14 +63,14 @@ namespace OpenSim.Framework.RegionLoader.Filesystem
63 63
64 if (configFiles.Length == 0) 64 if (configFiles.Length == 0)
65 { 65 {
66 new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "default.xml"), false); 66 new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "default.xml"), false, m_configSource);
67 configFiles = Directory.GetFiles(regionConfigPath, "*.xml"); 67 configFiles = Directory.GetFiles(regionConfigPath, "*.xml");
68 } 68 }
69 69
70 RegionInfo[] regionInfos = new RegionInfo[configFiles.Length]; 70 RegionInfo[] regionInfos = new RegionInfo[configFiles.Length];
71 for (int i = 0; i < configFiles.Length; i++) 71 for (int i = 0; i < configFiles.Length; i++)
72 { 72 {
73 RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), configFiles[i], false); 73 RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), configFiles[i], false, m_configSource);
74 regionInfos[i] = regionInfo; 74 regionInfos[i] = regionInfo;
75 } 75 }
76 76
diff --git a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs
index 029d396..60242e6 100644
--- a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs
+++ b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs
@@ -39,23 +39,23 @@ namespace OpenSim.Framework.RegionLoader.Web
39 { 39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 41
42 private IConfigSource m_configSouce; 42 private IConfigSource m_configSource;
43 43
44 public void SetIniConfigSource(IConfigSource configSource) 44 public void SetIniConfigSource(IConfigSource configSource)
45 { 45 {
46 m_configSouce = configSource; 46 m_configSource = configSource;
47 } 47 }
48 48
49 public RegionInfo[] LoadRegions() 49 public RegionInfo[] LoadRegions()
50 { 50 {
51 if (m_configSouce == null) 51 if (m_configSource == null)
52 { 52 {
53 m_log.Error("[WEBLOADER]: Unable to load configuration source!"); 53 m_log.Error("[WEBLOADER]: Unable to load configuration source!");
54 return null; 54 return null;
55 } 55 }
56 else 56 else
57 { 57 {
58 IConfig startupConfig = (IConfig) m_configSouce.Configs["Startup"]; 58 IConfig startupConfig = (IConfig) m_configSource.Configs["Startup"];
59 string url = startupConfig.GetString("regionload_webserver_url", String.Empty).Trim(); 59 string url = startupConfig.GetString("regionload_webserver_url", String.Empty).Trim();
60 if (url == String.Empty) 60 if (url == String.Empty)
61 { 61 {
@@ -89,7 +89,7 @@ namespace OpenSim.Framework.RegionLoader.Web
89 { 89 {
90 m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml); 90 m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml);
91 regionInfos[i] = 91 regionInfos[i] =
92 new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false); 92 new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false,m_configSource);
93 } 93 }
94 94
95 return regionInfos; 95 return regionInfos;