aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetServer/Main.cs
diff options
context:
space:
mode:
authorlbsa712007-07-03 14:37:29 +0000
committerlbsa712007-07-03 14:37:29 +0000
commit9b6b6d05d45cf0f754a0b26bf6240ef50be66563 (patch)
tree8d72120aac2184c5ed4c5ab5f6b673ef496a0803 /OpenSim/Grid/AssetServer/Main.cs
parent* Completed conceptual LlsdMethod - everything resides in SimpleApp pending g... (diff)
downloadopensim-SC-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.zip
opensim-SC-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.gz
opensim-SC-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.bz2
opensim-SC-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.xz
* Optimized usings (the 'LL ate my scripts' commit)
* added some licensing info
Diffstat (limited to 'OpenSim/Grid/AssetServer/Main.cs')
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs24
1 files changed, 7 insertions, 17 deletions
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index d06998d..112d72f 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -29,20 +29,10 @@
29using System; 29using System;
30using System.IO; 30using System.IO;
31using System.Text; 31using System.Text;
32using System.Timers; 32using Db4objects.Db4o;
33using System.Net;
34using System.Reflection;
35using System.Threading;
36using libsecondlife; 33using libsecondlife;
37using OpenSim.Framework;
38using OpenSim.Framework.Sims;
39using OpenSim.Framework.Console; 34using OpenSim.Framework.Console;
40using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
41using OpenSim.Framework.Interfaces;
42using OpenSim.Framework.Utilities;
43using OpenSim.Framework.Servers;
44using Db4objects.Db4o;
45using Db4objects.Db4o.Query;
46 36
47namespace OpenSim.Grid.AssetServer 37namespace OpenSim.Grid.AssetServer
48{ 38{
@@ -81,7 +71,7 @@ namespace OpenSim.Grid.AssetServer
81 private OpenAsset_Main() 71 private OpenAsset_Main()
82 { 72 {
83 m_console = new LogBase("opengrid-AssetServer-console.log", "OpenAsset", this, false); 73 m_console = new LogBase("opengrid-AssetServer-console.log", "OpenAsset", this, false);
84 OpenSim.Framework.Console.MainLog.Instance = m_console; 74 MainLog.Instance = m_console;
85 } 75 }
86 76
87 public void Startup() 77 public void Startup()
@@ -161,17 +151,17 @@ namespace OpenSim.Grid.AssetServer
161 151
162 public void setupDB() 152 public void setupDB()
163 { 153 {
164 bool yapfile = System.IO.File.Exists("assets.yap"); 154 bool yapfile = File.Exists("assets.yap");
165 try 155 try
166 { 156 {
167 db = Db4oFactory.OpenFile("assets.yap"); 157 db = Db4oFactory.OpenFile("assets.yap");
168 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Main.cs:setupDB() - creation"); 158 MainLog.Instance.Verbose( "Main.cs:setupDB() - creation");
169 } 159 }
170 catch (Exception e) 160 catch (Exception e)
171 { 161 {
172 db.Close(); 162 db.Close();
173 OpenSim.Framework.Console.MainLog.Instance.Warn("Main.cs:setupDB() - Exception occured"); 163 MainLog.Instance.Warn("Main.cs:setupDB() - Exception occured");
174 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); 164 MainLog.Instance.Warn(e.ToString());
175 } 165 }
176 if (!yapfile) 166 if (!yapfile)
177 { 167 {
@@ -273,7 +263,7 @@ namespace OpenSim.Grid.AssetServer
273 { 263 {
274 264
275 265
276 string dataPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder; 266 string dataPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder;
277 string fileName = Path.Combine(dataPath, filename); 267 string fileName = Path.Combine(dataPath, filename);
278 FileInfo fInfo = new FileInfo(fileName); 268 FileInfo fInfo = new FileInfo(fileName);
279 long numBytes = fInfo.Length; 269 long numBytes = fInfo.Length;