aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers/Asset/AssetServerConnector.cs')
-rw-r--r--OpenSim/Server/Handlers/Asset/AssetServerConnector.cs13
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));