diff options
author | Melanie | 2011-11-24 01:16:37 +0000 |
---|---|---|
committer | Melanie | 2011-11-24 01:16:37 +0000 |
commit | a8270cb48cf8dbca7595da5963d8fafdb1141529 (patch) | |
tree | cf878acca0c652239f4441c3783647b6b0b688a6 /OpenSim/Region/Application | |
parent | Merge branch 'master' into bigmerge (diff) | |
parent | Append asset ID to URL for storage requests to allow caching proxies to work ... (diff) | |
download | opensim-SC-a8270cb48cf8dbca7595da5963d8fafdb1141529.zip opensim-SC-a8270cb48cf8dbca7595da5963d8fafdb1141529.tar.gz opensim-SC-a8270cb48cf8dbca7595da5963d8fafdb1141529.tar.bz2 opensim-SC-a8270cb48cf8dbca7595da5963d8fafdb1141529.tar.xz |
Merge branch 'master' into bigmerge
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/ConfigurationLoader.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 9 |
2 files changed, 27 insertions, 2 deletions
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index d0f6ab7..4a7c8b0 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs | |||
@@ -70,7 +70,7 @@ namespace OpenSim | |||
70 | /// <param name="networkInfo"></param> | 70 | /// <param name="networkInfo"></param> |
71 | /// <returns>A configuration that gets passed to modules</returns> | 71 | /// <returns>A configuration that gets passed to modules</returns> |
72 | public OpenSimConfigSource LoadConfigSettings( | 72 | public OpenSimConfigSource LoadConfigSettings( |
73 | IConfigSource argvSource, out ConfigSettings configSettings, | 73 | IConfigSource argvSource, EnvConfigSource envConfigSource, out ConfigSettings configSettings, |
74 | out NetworkServersInfo networkInfo) | 74 | out NetworkServersInfo networkInfo) |
75 | { | 75 | { |
76 | m_configSettings = configSettings = new ConfigSettings(); | 76 | m_configSettings = configSettings = new ConfigSettings(); |
@@ -195,6 +195,24 @@ namespace OpenSim | |||
195 | // Make sure command line options take precedence | 195 | // Make sure command line options take precedence |
196 | m_config.Source.Merge(argvSource); | 196 | m_config.Source.Merge(argvSource); |
197 | 197 | ||
198 | |||
199 | IConfig enVars = m_config.Source.Configs["Environment"]; | ||
200 | |||
201 | if( enVars != null ) | ||
202 | { | ||
203 | string[] env_keys = enVars.GetKeys(); | ||
204 | |||
205 | foreach ( string key in env_keys ) | ||
206 | { | ||
207 | envConfigSource.AddEnv(key, string.Empty); | ||
208 | } | ||
209 | |||
210 | envConfigSource.LoadEnv(); | ||
211 | m_config.Source.Merge(envConfigSource); | ||
212 | m_config.Source.ExpandKeyValues(); | ||
213 | } | ||
214 | |||
215 | |||
198 | ReadConfigSettings(); | 216 | ReadConfigSettings(); |
199 | 217 | ||
200 | return m_config; | 218 | return m_config; |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 542211a..8e1eb95 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -112,6 +112,13 @@ namespace OpenSim | |||
112 | get { return m_clientServers; } | 112 | get { return m_clientServers; } |
113 | } | 113 | } |
114 | 114 | ||
115 | protected EnvConfigSource m_EnvConfigSource = new EnvConfigSource(); | ||
116 | |||
117 | public EnvConfigSource envConfigSource | ||
118 | { | ||
119 | get { return m_EnvConfigSource; } | ||
120 | } | ||
121 | |||
115 | protected List<IClientNetworkServer> m_clientServers = new List<IClientNetworkServer>(); | 122 | protected List<IClientNetworkServer> m_clientServers = new List<IClientNetworkServer>(); |
116 | 123 | ||
117 | public uint HttpServerPort | 124 | public uint HttpServerPort |
@@ -146,7 +153,7 @@ namespace OpenSim | |||
146 | protected virtual void LoadConfigSettings(IConfigSource configSource) | 153 | protected virtual void LoadConfigSettings(IConfigSource configSource) |
147 | { | 154 | { |
148 | m_configLoader = new ConfigurationLoader(); | 155 | m_configLoader = new ConfigurationLoader(); |
149 | m_config = m_configLoader.LoadConfigSettings(configSource, out m_configSettings, out m_networkServersInfo); | 156 | m_config = m_configLoader.LoadConfigSettings(configSource, envConfigSource, out m_configSettings, out m_networkServersInfo); |
150 | ReadExtraConfigSettings(); | 157 | ReadExtraConfigSettings(); |
151 | } | 158 | } |
152 | 159 | ||