diff options
author | lbsa71 | 2007-07-03 14:37:29 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-03 14:37:29 +0000 |
commit | 9b6b6d05d45cf0f754a0b26bf6240ef50be66563 (patch) | |
tree | 8d72120aac2184c5ed4c5ab5f6b673ef496a0803 /OpenSim/Grid/AssetServer/Main.cs | |
parent | * Completed conceptual LlsdMethod - everything resides in SimpleApp pending g... (diff) | |
download | opensim-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 '')
-rw-r--r-- | OpenSim/Grid/AssetServer/Main.cs | 24 |
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 @@ | |||
29 | using System; | 29 | using System; |
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Text; | 31 | using System.Text; |
32 | using System.Timers; | 32 | using Db4objects.Db4o; |
33 | using System.Net; | ||
34 | using System.Reflection; | ||
35 | using System.Threading; | ||
36 | using libsecondlife; | 33 | using libsecondlife; |
37 | using OpenSim.Framework; | ||
38 | using OpenSim.Framework.Sims; | ||
39 | using OpenSim.Framework.Console; | 34 | using OpenSim.Framework.Console; |
40 | using OpenSim.Framework.Types; | 35 | using OpenSim.Framework.Types; |
41 | using OpenSim.Framework.Interfaces; | ||
42 | using OpenSim.Framework.Utilities; | ||
43 | using OpenSim.Framework.Servers; | ||
44 | using Db4objects.Db4o; | ||
45 | using Db4objects.Db4o.Query; | ||
46 | 36 | ||
47 | namespace OpenSim.Grid.AssetServer | 37 | namespace 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; |