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/Region/GridInterfaces/Local | |
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 'OpenSim/Region/GridInterfaces/Local')
-rw-r--r-- | OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs | 28 |
2 files changed, 13 insertions, 17 deletions
diff --git a/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs b/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs index 52ecd6b..b5fc1ef 100644 --- a/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs +++ b/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs | |||
@@ -26,9 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.CompilerServices; | ||
30 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
31 | |||
32 | // Information about this assembly is defined by the following | 30 | // Information about this assembly is defined by the following |
33 | // attributes. | 31 | // attributes. |
34 | // | 32 | // |
diff --git a/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs index 95d03f1..bd303e1 100644 --- a/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs +++ b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs | |||
@@ -26,17 +26,15 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using System.Threading; | ||
32 | using System.IO; | 29 | using System.IO; |
30 | using System.Threading; | ||
31 | using Db4objects.Db4o; | ||
32 | using Db4objects.Db4o.Query; | ||
33 | using libsecondlife; | ||
34 | using OpenSim.Framework.Console; | ||
33 | using OpenSim.Framework.Interfaces; | 35 | using OpenSim.Framework.Interfaces; |
34 | using OpenSim.Framework.Types; | 36 | using OpenSim.Framework.Types; |
35 | using OpenSim.Framework.Utilities; | 37 | using OpenSim.Framework.Utilities; |
36 | using OpenSim.Framework.Console; | ||
37 | using libsecondlife; | ||
38 | using Db4objects.Db4o; | ||
39 | using Db4objects.Db4o.Query; | ||
40 | 38 | ||
41 | namespace OpenSim.Region.GridInterfaces.Local | 39 | namespace OpenSim.Region.GridInterfaces.Local |
42 | { | 40 | { |
@@ -64,19 +62,19 @@ namespace OpenSim.Region.GridInterfaces.Local | |||
64 | { | 62 | { |
65 | bool yapfile; | 63 | bool yapfile; |
66 | this._assetRequests = new BlockingQueue<ARequest>(); | 64 | this._assetRequests = new BlockingQueue<ARequest>(); |
67 | yapfile = System.IO.File.Exists("assets.yap"); | 65 | yapfile = File.Exists("assets.yap"); |
68 | 66 | ||
69 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Local Asset Server class created"); | 67 | MainLog.Instance.Verbose( "Local Asset Server class created"); |
70 | try | 68 | try |
71 | { | 69 | { |
72 | db = Db4oFactory.OpenFile("assets.yap"); | 70 | db = Db4oFactory.OpenFile("assets.yap"); |
73 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Db4 Asset database creation"); | 71 | MainLog.Instance.Verbose( "Db4 Asset database creation"); |
74 | } | 72 | } |
75 | catch (Exception e) | 73 | catch (Exception e) |
76 | { | 74 | { |
77 | db.Close(); | 75 | db.Close(); |
78 | OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.MEDIUM, "Db4 Asset server :Constructor - Exception occured"); | 76 | MainLog.Instance.WriteLine(LogPriority.MEDIUM, "Db4 Asset server :Constructor - Exception occured"); |
79 | OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); | 77 | MainLog.Instance.Warn(e.ToString()); |
80 | } | 78 | } |
81 | if (!yapfile) | 79 | if (!yapfile) |
82 | { | 80 | { |
@@ -124,7 +122,7 @@ namespace OpenSim.Region.GridInterfaces.Local | |||
124 | { | 122 | { |
125 | if (db != null) | 123 | if (db != null) |
126 | { | 124 | { |
127 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Closing local asset server database"); | 125 | MainLog.Instance.Verbose( "Closing local asset server database"); |
128 | db.Close(); | 126 | db.Close(); |
129 | } | 127 | } |
130 | } | 128 | } |
@@ -168,7 +166,7 @@ namespace OpenSim.Region.GridInterfaces.Local | |||
168 | try | 166 | try |
169 | { | 167 | { |
170 | 168 | ||
171 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Setting up asset database"); | 169 | MainLog.Instance.Verbose( "Setting up asset database"); |
172 | 170 | ||
173 | AssetBase Image = new AssetBase(); | 171 | AssetBase Image = new AssetBase(); |
174 | Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001"); | 172 | Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001"); |
@@ -281,7 +279,7 @@ namespace OpenSim.Region.GridInterfaces.Local | |||
281 | //should request Asset from storage manager | 279 | //should request Asset from storage manager |
282 | //but for now read from file | 280 | //but for now read from file |
283 | 281 | ||
284 | string dataPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder; | 282 | string dataPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder; |
285 | string fileName = Path.Combine(dataPath, filename); | 283 | string fileName = Path.Combine(dataPath, filename); |
286 | FileInfo fInfo = new FileInfo(fileName); | 284 | FileInfo fInfo = new FileInfo(fileName); |
287 | long numBytes = fInfo.Length; | 285 | long numBytes = fInfo.Length; |