diff options
author | Tedd Hansen | 2008-02-01 23:56:09 +0000 |
---|---|---|
committer | Tedd Hansen | 2008-02-01 23:56:09 +0000 |
commit | 694642a482ffefb9c11ef05d833c508f383d2f0d (patch) | |
tree | ac2dd670d40e53cf83a3069962d3feb9490b54b0 /OpenSim/Region/Application | |
parent | Bugfix, maybe it won't crash during startup and crash somewhere else instead? :) (diff) | |
download | opensim-SC_OLD-694642a482ffefb9c11ef05d833c508f383d2f0d.zip opensim-SC_OLD-694642a482ffefb9c11ef05d833c508f383d2f0d.tar.gz opensim-SC_OLD-694642a482ffefb9c11ef05d833c508f383d2f0d.tar.bz2 opensim-SC_OLD-694642a482ffefb9c11ef05d833c508f383d2f0d.tar.xz |
Moved iniFilePath to a static and put it in OpenSim.Application.iniFilePath.
Refreshing config based on this.
Temporarily disabled feature to refresh config file while running.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index bf44274..2045b56 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim | |||
35 | { | 35 | { |
36 | public class Application | 36 | public class Application |
37 | { | 37 | { |
38 | public static string iniFilePath = ""; | ||
39 | |||
38 | //could move our main function into OpenSimMain and kill this class | 40 | //could move our main function into OpenSimMain and kill this class |
39 | [STAThread] | 41 | [STAThread] |
40 | public static void Main(string[] args) | 42 | public static void Main(string[] args) |
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 70f9fd0..ad5a960 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -125,21 +125,21 @@ namespace OpenSim | |||
125 | AddinManager.Initialize("."); | 125 | AddinManager.Initialize("."); |
126 | AddinManager.Registry.Update(null); | 126 | AddinManager.Registry.Update(null); |
127 | 127 | ||
128 | string iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); | 128 | Application.iniFilePath = startupConfig.GetString("inifile", "OpenSim.ini"); |
129 | 129 | ||
130 | m_config = new IniConfigSource(); | 130 | m_config = new IniConfigSource(); |
131 | //check for .INI file (either default or name passed in command line) | 131 | //check for .INI file (either default or name passed in command line) |
132 | if (File.Exists(iniFilePath)) | 132 | if (File.Exists(Application.iniFilePath)) |
133 | { | 133 | { |
134 | m_config.Merge(new IniConfigSource(iniFilePath)); | 134 | m_config.Merge(new IniConfigSource(Application.iniFilePath)); |
135 | m_config.Merge(configSource); | 135 | m_config.Merge(configSource); |
136 | } | 136 | } |
137 | else | 137 | else |
138 | { | 138 | { |
139 | iniFilePath = Path.Combine(Util.configDir(), iniFilePath); | 139 | Application.iniFilePath = Path.Combine(Util.configDir(), Application.iniFilePath); |
140 | if (File.Exists(iniFilePath)) | 140 | if (File.Exists(Application.iniFilePath)) |
141 | { | 141 | { |
142 | m_config.Merge(new IniConfigSource(iniFilePath)); | 142 | m_config.Merge(new IniConfigSource(Application.iniFilePath)); |
143 | m_config.Merge(configSource); | 143 | m_config.Merge(configSource); |
144 | } | 144 | } |
145 | else | 145 | else |
@@ -149,7 +149,7 @@ namespace OpenSim | |||
149 | 149 | ||
150 | m_config.Merge(configSource); | 150 | m_config.Merge(configSource); |
151 | 151 | ||
152 | m_config.Save(iniFilePath); | 152 | m_config.Save(Application.iniFilePath); |
153 | } | 153 | } |
154 | } | 154 | } |
155 | 155 | ||