Remove now dead code

afrisby
Justin Clarke Casey 2007-12-28 22:21:53 +00:00
parent 4ae10034bd
commit 592c39a7b0
1 changed files with 0 additions and 44 deletions

View File

@ -109,7 +109,6 @@ namespace OpenSim.Grid.AssetServer
return null; return null;
} }
public IAssetProvider LoadDatabasePlugin(string FileName) public IAssetProvider LoadDatabasePlugin(string FileName)
{ {
MainLog.Instance.Verbose("ASSET SERVER", "LoadDatabasePlugin: Attempting to load " + 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"); MainLog.Instance.Error("ASSET", "Failed to load a database plugin, server halting");
Environment.Exit(-1); Environment.Exit(-1);
} }
// assetServer.LoadDefaultAssets();
// m_assetServer = assetServer;
} }
catch (Exception e) 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() public void LoadDefaultAssets()
{ {
assetLoader.ForEachXmlAsset(StoreAsset); assetLoader.ForEachXmlAsset(StoreAsset);