diff options
author | Melanie | 2009-09-29 09:56:17 +0100 |
---|---|---|
committer | Melanie | 2009-09-29 09:56:17 +0100 |
commit | 691f1e8aa08db84b689793ea9cd2c72bcfdd9b17 (patch) | |
tree | bccc5f146d169c14615384d60d94f1ae3f79f354 /OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs | |
parent | Fixed a bug that was causing exceptions to the thrown in ROBUST MainServer. (diff) | |
download | opensim-SC-691f1e8aa08db84b689793ea9cd2c72bcfdd9b17.zip opensim-SC-691f1e8aa08db84b689793ea9cd2c72bcfdd9b17.tar.gz opensim-SC-691f1e8aa08db84b689793ea9cd2c72bcfdd9b17.tar.bz2 opensim-SC-691f1e8aa08db84b689793ea9cd2c72bcfdd9b17.tar.xz |
Fix loading modules with alternate configurations and ports into ROBUST.
Make all current modules support the configuration name option
Diffstat (limited to 'OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs b/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs index a4ab0d3..07bafc8 100644 --- a/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs +++ b/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs | |||
@@ -37,19 +37,23 @@ namespace OpenSim.Server.Handlers.Freeswitch | |||
37 | public class FreeswitchServerConnector : ServiceConnector | 37 | public class FreeswitchServerConnector : ServiceConnector |
38 | { | 38 | { |
39 | private IFreeswitchService m_FreeswitchService; | 39 | private IFreeswitchService m_FreeswitchService; |
40 | private string m_ConfigName = "FreeswitchService"; | ||
40 | 41 | ||
41 | public FreeswitchServerConnector(IConfigSource config, IHttpServer server) : | 42 | public FreeswitchServerConnector(IConfigSource config, IHttpServer server, string configName) : |
42 | base(config, server) | 43 | base(config, server, configName) |
43 | { | 44 | { |
44 | IConfig serverConfig = config.Configs["FreeswitchService"]; | 45 | if (configName != String.Empty) |
46 | m_ConfigName = configName; | ||
47 | |||
48 | IConfig serverConfig = config.Configs[m_ConfigName]; | ||
45 | if (serverConfig == null) | 49 | if (serverConfig == null) |
46 | throw new Exception("No section 'Server' in config file"); | 50 | throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName)); |
47 | 51 | ||
48 | string freeswitchService = serverConfig.GetString("LocalServiceModule", | 52 | string freeswitchService = serverConfig.GetString("LocalServiceModule", |
49 | String.Empty); | 53 | String.Empty); |
50 | 54 | ||
51 | if (freeswitchService == String.Empty) | 55 | if (freeswitchService == String.Empty) |
52 | throw new Exception("No FreeswitchService in config file"); | 56 | throw new Exception("No LocalServiceModule in config file"); |
53 | 57 | ||
54 | Object[] args = new Object[] { config }; | 58 | Object[] args = new Object[] { config }; |
55 | m_FreeswitchService = | 59 | m_FreeswitchService = |