mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
Fix loading modules with alternate configurations and ports into ROBUST.
Make all current modules support the configuration name option
This commit is contained in:
@@ -37,19 +37,23 @@ namespace OpenSim.Server.Handlers.Freeswitch
|
||||
public class FreeswitchServerConnector : ServiceConnector
|
||||
{
|
||||
private IFreeswitchService m_FreeswitchService;
|
||||
private string m_ConfigName = "FreeswitchService";
|
||||
|
||||
public FreeswitchServerConnector(IConfigSource config, IHttpServer server) :
|
||||
base(config, server)
|
||||
public FreeswitchServerConnector(IConfigSource config, IHttpServer server, string configName) :
|
||||
base(config, server, configName)
|
||||
{
|
||||
IConfig serverConfig = config.Configs["FreeswitchService"];
|
||||
if (configName != String.Empty)
|
||||
m_ConfigName = configName;
|
||||
|
||||
IConfig serverConfig = config.Configs[m_ConfigName];
|
||||
if (serverConfig == null)
|
||||
throw new Exception("No section 'Server' in config file");
|
||||
throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
|
||||
|
||||
string freeswitchService = serverConfig.GetString("LocalServiceModule",
|
||||
String.Empty);
|
||||
|
||||
if (freeswitchService == String.Empty)
|
||||
throw new Exception("No FreeswitchService in config file");
|
||||
throw new Exception("No LocalServiceModule in config file");
|
||||
|
||||
Object[] args = new Object[] { config };
|
||||
m_FreeswitchService =
|
||||
|
||||
Reference in New Issue
Block a user