From a595881dc06c8359faa731a0af2d8be7290daad1 Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 30 Apr 2007 15:38:51 +0000 Subject: fixed the VS 2005 solution/ project files. and a couple of other small changes --- OpenGridServices.AssetServer/Main.cs | 63 ++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 31 deletions(-) (limited to 'OpenGridServices.AssetServer/Main.cs') diff --git a/OpenGridServices.AssetServer/Main.cs b/OpenGridServices.AssetServer/Main.cs index b57a5a5..21a4fce 100644 --- a/OpenGridServices.AssetServer/Main.cs +++ b/OpenGridServices.AssetServer/Main.cs @@ -32,18 +32,18 @@ using System.IO; using System.Text; using System.Timers; using System.Net; -using System.Reflection; +using System.Reflection; using System.Threading; using libsecondlife; using OpenSim.Framework; using OpenSim.Framework.Sims; using OpenSim.Framework.Console; -using OpenSim.Framework.Types; -using OpenSim.Framework.Interfaces; +using OpenSim.Framework.Types; +using OpenSim.Framework.Interfaces; using OpenSim.GridInterfaces.Local; // REFACTORING IS NEEDED!!!!!!!!!!! using OpenSim.Servers; using Db4objects.Db4o; -using Db4objects.Db4o.Query; +using Db4objects.Db4o.Query; namespace OpenGridServices.AssetServer { @@ -54,7 +54,7 @@ namespace OpenGridServices.AssetServer private IObjectContainer db; public static OpenAsset_Main assetserver; - + private ConsoleBase m_console; [STAThread] @@ -85,9 +85,10 @@ namespace OpenGridServices.AssetServer } public void Startup() - { m_console.WriteLine("Main.cs:Startup() - Setting up asset DB"); - setupDB(); - + { + m_console.WriteLine("Main.cs:Startup() - Setting up asset DB"); + setupDB(); + m_console.WriteLine("Main.cs:Startup() - Starting HTTP process"); BaseHttpServer httpServer = new BaseHttpServer(8003); @@ -98,18 +99,18 @@ namespace OpenGridServices.AssetServer httpServer.Start(); } - - public string assetGetMethod(string request, string path, string param) { - byte[] assetdata=getAssetData(new LLUUID(param),false); - if(assetdata!=null) { - return System.Text.Encoding.ASCII.GetString(assetdata); - } else { - return ""; - } - - } - - public byte[] getAssetData(LLUUID assetID, bool isTexture) { + + public string assetGetMethod(string request, string path, string param) { + byte[] assetdata=getAssetData(new LLUUID(param),false); + if(assetdata!=null) { + return System.Text.Encoding.ASCII.GetString(assetdata); + } else { + return ""; + } + + } + + public byte[] getAssetData(LLUUID assetID, bool isTexture) { byte[] idata = null; bool found = false; AssetStorage foundAsset = null; @@ -129,10 +130,10 @@ namespace OpenGridServices.AssetServer { return null; } - } + } - public void setupDB() { - bool yapfile=System.IO.File.Exists("assets.yap"); + public void setupDB() { + bool yapfile=System.IO.File.Exists("assets.yap"); try { db = Db4oFactory.OpenFile("assets.yap"); @@ -148,9 +149,9 @@ namespace OpenGridServices.AssetServer { this.LoadDB(); } - } - - public void LoadDB() { + } + + public void LoadDB() { try { @@ -236,9 +237,9 @@ namespace OpenGridServices.AssetServer catch (Exception e) { Console.WriteLine(e.Message); - } - } - + } + } + private void LoadAsset(AssetBase info, bool image, string filename) { @@ -255,8 +256,8 @@ namespace OpenGridServices.AssetServer fStream.Close(); info.Data = idata; //info.loaded=true; - } - + } + /*private GridConfig LoadConfigDll(string dllName) { Assembly pluginAssembly = Assembly.LoadFrom(dllName); -- cgit v1.1