diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Servers/Asset/AssetServerConnector.cs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Servers/Asset/AssetServerConnector.cs b/OpenSim/Servers/Asset/AssetServerConnector.cs index c9d2300..32e27c5 100644 --- a/OpenSim/Servers/Asset/AssetServerConnector.cs +++ b/OpenSim/Servers/Asset/AssetServerConnector.cs | |||
@@ -25,9 +25,10 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
28 | using Nini.Config; | 29 | using Nini.Config; |
30 | using OpenSim.Servers.Base; | ||
29 | using OpenSim.Services.Interfaces; | 31 | using OpenSim.Services.Interfaces; |
30 | using OpenSim.Services.AssetService; | ||
31 | using OpenSim.Framework.Servers.HttpServer; | 32 | using OpenSim.Framework.Servers.HttpServer; |
32 | 33 | ||
33 | namespace OpenSim.Servers.AssetServer | 34 | namespace OpenSim.Servers.AssetServer |
@@ -38,9 +39,23 @@ namespace OpenSim.Servers.AssetServer | |||
38 | 39 | ||
39 | public AssetServiceConnector(IConfigSource config, IHttpServer server) | 40 | public AssetServiceConnector(IConfigSource config, IHttpServer server) |
40 | { | 41 | { |
41 | m_AssetService = new AssetService(config); | 42 | IConfig serverConfig = config.Configs["AssetService"]; |
43 | if (serverConfig == null) | ||
44 | throw new Exception("No section 'Server' in config file"); | ||
45 | |||
46 | string assetService = serverConfig.GetString("Module", | ||
47 | String.Empty); | ||
48 | |||
49 | if (assetService == String.Empty) | ||
50 | throw new Exception("No AssetService in config file"); | ||
51 | |||
52 | Object[] args = new Object[] { config }; | ||
53 | m_AssetService = | ||
54 | ServerUtils.LoadPlugin<IAssetService>(assetService, args); | ||
42 | 55 | ||
43 | server.AddStreamHandler(new AssetServerGetHandler(m_AssetService)); | 56 | server.AddStreamHandler(new AssetServerGetHandler(m_AssetService)); |
57 | server.AddStreamHandler(new AssetServerPostHandler(m_AssetService)); | ||
58 | server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService)); | ||
44 | } | 59 | } |
45 | } | 60 | } |
46 | } | 61 | } |