aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs')
-rw-r--r--OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs14
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 =