From 592c39a7b011ef062b2b4f85e3808a514d513660 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 28 Dec 2007 22:21:53 +0000 Subject: Remove now dead code --- OpenSim/Grid/AssetServer/Main.cs | 44 ---------------------------------------- 1 file changed, 44 deletions(-) (limited to 'OpenSim/Grid/AssetServer') diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index 473c0bb..01b2c02 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs @@ -109,7 +109,6 @@ namespace OpenSim.Grid.AssetServer return null; } - public IAssetProvider LoadDatabasePlugin(string FileName) { MainLog.Instance.Verbose("ASSET SERVER", "LoadDatabasePlugin: Attempting to load " + FileName); @@ -150,9 +149,6 @@ namespace OpenSim.Grid.AssetServer MainLog.Instance.Error("ASSET", "Failed to load a database plugin, server halting"); Environment.Exit(-1); } -// assetServer.LoadDefaultAssets(); - -// m_assetServer = assetServer; } catch (Exception e) { @@ -161,46 +157,6 @@ namespace OpenSim.Grid.AssetServer } } - public void LoadAsset(AssetBase info, bool image, string filename) - { - //should request Asset from storage manager - //but for now read from file - - string dataPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder; - string fileName = Path.Combine(dataPath, filename); - FileInfo fInfo = new FileInfo(fileName); - long numBytes = fInfo.Length; - FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read); - byte[] idata = new byte[numBytes]; - BinaryReader br = new BinaryReader(fStream); - idata = br.ReadBytes((int) numBytes); - br.Close(); - fStream.Close(); - info.Data = idata; - //info.loaded=true; - } - - public AssetBase CreateAsset(string assetIdStr, string name, string filename, bool isImage) - { - AssetBase asset = new AssetBase( - new LLUUID(assetIdStr), - name - ); - - if (!String.IsNullOrEmpty(filename)) - { - MainLog.Instance.Verbose("ASSETS", "Loading: [{0}][{1}]", name, filename); - - LoadAsset(asset, isImage, filename); - } - else - { - MainLog.Instance.Verbose("ASSETS", "Instantiated: [{0}]", name); - } - - return asset; - } - public void LoadDefaultAssets() { assetLoader.ForEachXmlAsset(StoreAsset); -- cgit v1.1