aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetServer
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/AssetServer/AssetHttpServer.cs15
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs24
-rw-r--r--OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs2
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*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.IO;
30using System.Net; 30using System.Net;
31using System.Text; 31using System.Text;
32using System.Text.RegularExpressions; 32using System.Text.RegularExpressions;
33using System.Threading;
34//using OpenSim.CAPS;
35using Nwc.XmlRpc;
36using System.Collections;
37using OpenSim.Framework.Console;
38using OpenSim.Framework.Servers; 33using OpenSim.Framework.Servers;
39 34
40namespace OpenSim.Grid.AssetServer 35namespace 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 @@
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;
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*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices; 29using 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.