aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetServer/Main.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/AssetServer/Main.cs')
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index d2c247a..c863c76 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Grid.AssetServer
51 // Temporarily hardcoded - should be a plugin 51 // Temporarily hardcoded - should be a plugin
52 protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); 52 protected IAssetLoader assetLoader = new AssetLoaderFileSystem();
53 53
54 private IAssetProvider m_assetProvider; 54 private IAssetProvider m_assetProvider;
55 55
56 [STAThread] 56 [STAThread]
57 public static void Main(string[] args) 57 public static void Main(string[] args)
@@ -94,14 +94,19 @@ namespace OpenSim.Grid.AssetServer
94 LoadDefaultAssets(); 94 LoadDefaultAssets();
95 95
96 m_log.Info("[ASSET]: Starting HTTP process"); 96 m_log.Info("[ASSET]: Starting HTTP process");
97 BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); 97 m_httpServer = new BaseHttpServer(m_config.HttpPort);
98 98
99 StatsManager.StartCollectingAssetStats(); 99 StatsManager.StartCollectingAssetStats();
100 100
101 httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider)); 101 AddHttpHandlers();
102 httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider));
103 102
104 httpServer.Start(); 103 m_httpServer.Start();
104 }
105
106 protected void AddHttpHandlers()
107 {
108 m_httpServer.AddStreamHandler(new GetAssetStreamHandler(this, m_assetProvider));
109 m_httpServer.AddStreamHandler(new PostAssetStreamHandler(this, m_assetProvider));
105 } 110 }
106 111
107 public byte[] GetAssetData(LLUUID assetID, bool isTexture) 112 public byte[] GetAssetData(LLUUID assetID, bool isTexture)