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 | |
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/Grid/AssetServer')
-rw-r--r-- | OpenSim/Grid/AssetServer/AssetHttpServer.cs | 15 | ||||
-rw-r--r-- | OpenSim/Grid/AssetServer/Main.cs | 24 | ||||
-rw-r--r-- | OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs | 2 |
3 files changed, 12 insertions, 29 deletions
diff --git a/OpenSim/Grid/AssetServer/AssetHttpServer.cs b/OpenSim/Grid/AssetServer/AssetHttpServer.cs index 31cb379..9546891 100644 --- a/OpenSim/Grid/AssetServer/AssetHttpServer.cs +++ b/OpenSim/Grid/AssetServer/AssetHttpServer.cs | |||
@@ -26,15 +26,10 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.IO; |
30 | using System.Net; | 30 | using System.Net; |
31 | using System.Text; | 31 | using System.Text; |
32 | using System.Text.RegularExpressions; | 32 | using System.Text.RegularExpressions; |
33 | using System.Threading; | ||
34 | //using OpenSim.CAPS; | ||
35 | using Nwc.XmlRpc; | ||
36 | using System.Collections; | ||
37 | using OpenSim.Framework.Console; | ||
38 | using OpenSim.Framework.Servers; | 33 | using OpenSim.Framework.Servers; |
39 | 34 | ||
40 | namespace OpenSim.Grid.AssetServer | 35 | namespace OpenSim.Grid.AssetServer |
@@ -69,9 +64,9 @@ namespace OpenSim.Grid.AssetServer | |||
69 | response.KeepAlive = false; | 64 | response.KeepAlive = false; |
70 | response.SendChunked = false; | 65 | response.SendChunked = false; |
71 | 66 | ||
72 | System.IO.Stream body = request.InputStream; | 67 | Stream body = request.InputStream; |
73 | System.Text.Encoding encoding = System.Text.Encoding.UTF8; | 68 | Encoding encoding = Encoding.UTF8; |
74 | System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding); | 69 | StreamReader reader = new StreamReader(body, encoding); |
75 | 70 | ||
76 | string requestBody = reader.ReadToEnd(); | 71 | string requestBody = reader.ReadToEnd(); |
77 | body.Close(); | 72 | body.Close(); |
@@ -114,7 +109,7 @@ namespace OpenSim.Grid.AssetServer | |||
114 | 109 | ||
115 | Encoding Windows1252Encoding = Encoding.GetEncoding(1252); | 110 | Encoding Windows1252Encoding = Encoding.GetEncoding(1252); |
116 | byte[] buffer = Windows1252Encoding.GetBytes(responseString); | 111 | byte[] buffer = Windows1252Encoding.GetBytes(responseString); |
117 | System.IO.Stream output = response.OutputStream; | 112 | Stream output = response.OutputStream; |
118 | response.SendChunked = false; | 113 | response.SendChunked = false; |
119 | response.ContentLength64 = buffer.Length; | 114 | response.ContentLength64 = buffer.Length; |
120 | output.Write(buffer, 0, buffer.Length); | 115 | output.Write(buffer, 0, buffer.Length); |
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; |
diff --git a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs index f9a18a8..dc39ce2 100644 --- a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/AssetServer/Properties/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 | // General Information about an assembly is controlled through the following | 30 | // General Information about an assembly is controlled through the following |
33 | // set of attributes. Change these attribute values to modify the information | 31 | // set of attributes. Change these attribute values to modify the information |
34 | // associated with an assembly. | 32 | // associated with an assembly. |