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/Asset/AssetServerConnector.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/Asset/AssetServerConnector.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Asset/AssetServerConnector.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs index 7c74e05..f7eb292 100644 --- a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs +++ b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs | |||
@@ -37,13 +37,17 @@ namespace OpenSim.Server.Handlers.Asset | |||
37 | public class AssetServiceConnector : ServiceConnector | 37 | public class AssetServiceConnector : ServiceConnector |
38 | { | 38 | { |
39 | private IAssetService m_AssetService; | 39 | private IAssetService m_AssetService; |
40 | private string m_ConfigName = "AssetService"; | ||
40 | 41 | ||
41 | public AssetServiceConnector(IConfigSource config, IHttpServer server) : | 42 | public AssetServiceConnector(IConfigSource config, IHttpServer server, string configName) : |
42 | base(config, server) | 43 | base(config, server, configName) |
43 | { | 44 | { |
44 | IConfig serverConfig = config.Configs["AssetService"]; | 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 assetService = serverConfig.GetString("LocalServiceModule", | 52 | string assetService = serverConfig.GetString("LocalServiceModule", |
49 | String.Empty); | 53 | String.Empty); |
@@ -55,7 +59,6 @@ namespace OpenSim.Server.Handlers.Asset | |||
55 | m_AssetService = | 59 | m_AssetService = |
56 | ServerUtils.LoadPlugin<IAssetService>(assetService, args); | 60 | ServerUtils.LoadPlugin<IAssetService>(assetService, args); |
57 | 61 | ||
58 | //System.Console.WriteLine("XXXXXXXXXXXXXXXXXXX m_AssetSetvice == null? " + ((m_AssetService == null) ? "yes" : "no")); | ||
59 | server.AddStreamHandler(new AssetServerGetHandler(m_AssetService)); | 62 | server.AddStreamHandler(new AssetServerGetHandler(m_AssetService)); |
60 | server.AddStreamHandler(new AssetServerPostHandler(m_AssetService)); | 63 | server.AddStreamHandler(new AssetServerPostHandler(m_AssetService)); |
61 | server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService)); | 64 | server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService)); |