aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server')
-rw-r--r--OpenSim/Server/Base/HttpServerBase.cs39
-rw-r--r--OpenSim/Server/Handlers/Asset/Tests/AssetServerPostHandlerTests.cs1
-rw-r--r--OpenSim/Server/Handlers/BakedTextures/XBakesGetHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/BakedTextures/XBakesPostHandler.cs7
-rw-r--r--OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs5
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs3
6 files changed, 28 insertions, 29 deletions
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs
index 954783c..44ef124 100644
--- a/OpenSim/Server/Base/HttpServerBase.cs
+++ b/OpenSim/Server/Base/HttpServerBase.cs
@@ -56,15 +56,16 @@ namespace OpenSim.Server.Base
56 56
57 if (networkConfig == null) 57 if (networkConfig == null)
58 { 58 {
59 System.Console.WriteLine("Section 'Network' not found, server can't start"); 59 System.Console.WriteLine("ERROR: Section [Network] not found, server can't start");
60 Thread.CurrentThread.Abort(); 60 Environment.Exit(1);
61 } 61 }
62 62
63 uint port = (uint)networkConfig.GetInt("port", 0); 63 uint port = (uint)networkConfig.GetInt("port", 0);
64 64
65 if (port == 0) 65 if (port == 0)
66 { 66 {
67 Thread.CurrentThread.Abort(); 67 System.Console.WriteLine("ERROR: No 'port' entry found in [Network]. Server can't start");
68 Environment.Exit(1);
68 } 69 }
69 70
70 bool ssl_main = networkConfig.GetBoolean("https_main",false); 71 bool ssl_main = networkConfig.GetBoolean("https_main",false);
@@ -83,23 +84,24 @@ namespace OpenSim.Server.Base
83 // Then, check for https settings and ADD a server to 84 // Then, check for https settings and ADD a server to
84 // m_Servers 85 // m_Servers
85 // 86 //
86 if ( !ssl_main ) 87 if (!ssl_main)
87 { 88 {
88 httpServer = new BaseHttpServer(port); 89 httpServer = new BaseHttpServer(port);
89 } 90 }
90 else 91 else
91 { 92 {
92 string cert_path = networkConfig.GetString("cert_path",String.Empty); 93 string cert_path = networkConfig.GetString("cert_path",String.Empty);
93 if ( cert_path == String.Empty ) 94 if (cert_path == String.Empty)
94 { 95 {
95 System.Console.WriteLine("Path to X509 certificate is missing, server can't start."); 96 System.Console.WriteLine("ERROR: Path to X509 certificate is missing, server can't start.");
96 Thread.CurrentThread.Abort(); 97 Environment.Exit(1);
97 } 98 }
99
98 string cert_pass = networkConfig.GetString("cert_pass",String.Empty); 100 string cert_pass = networkConfig.GetString("cert_pass",String.Empty);
99 if ( cert_pass == String.Empty ) 101 if (cert_pass == String.Empty)
100 { 102 {
101 System.Console.WriteLine("Password for X509 certificate is missing, server can't start."); 103 System.Console.WriteLine("ERROR: Password for X509 certificate is missing, server can't start.");
102 Thread.CurrentThread.Abort(); 104 Environment.Exit(1);
103 } 105 }
104 106
105 httpServer = new BaseHttpServer(port, ssl_main, cert_path, cert_pass); 107 httpServer = new BaseHttpServer(port, ssl_main, cert_path, cert_pass);
@@ -109,21 +111,22 @@ namespace OpenSim.Server.Base
109 MainServer.Instance = httpServer; 111 MainServer.Instance = httpServer;
110 112
111 // If https_listener = true, then add an ssl listener on the https_port... 113 // If https_listener = true, then add an ssl listener on the https_port...
112 if ( ssl_listener == true ) { 114 if (ssl_listener == true)
113 115 {
114 uint https_port = (uint)networkConfig.GetInt("https_port", 0); 116 uint https_port = (uint)networkConfig.GetInt("https_port", 0);
115 117
116 string cert_path = networkConfig.GetString("cert_path",String.Empty); 118 string cert_path = networkConfig.GetString("cert_path",String.Empty);
117 if ( cert_path == String.Empty ) 119 if (cert_path == String.Empty)
118 { 120 {
119 System.Console.WriteLine("Path to X509 certificate is missing, server can't start."); 121 System.Console.WriteLine("ERROR: Path to X509 certificate is missing, server can't start.");
120 Thread.CurrentThread.Abort(); 122 Environment.Exit(1);
121 } 123 }
124
122 string cert_pass = networkConfig.GetString("cert_pass",String.Empty); 125 string cert_pass = networkConfig.GetString("cert_pass",String.Empty);
123 if ( cert_pass == String.Empty ) 126 if (cert_pass == String.Empty)
124 { 127 {
125 System.Console.WriteLine("Password for X509 certificate is missing, server can't start."); 128 System.Console.WriteLine("ERROR: Password for X509 certificate is missing, server can't start.");
126 Thread.CurrentThread.Abort(); 129 Environment.Exit(1);
127 } 130 }
128 131
129 MainServer.AddHttpServer(new BaseHttpServer(https_port, ssl_listener, cert_path, cert_pass)); 132 MainServer.AddHttpServer(new BaseHttpServer(https_port, ssl_listener, cert_path, cert_pass));
diff --git a/OpenSim/Server/Handlers/Asset/Tests/AssetServerPostHandlerTests.cs b/OpenSim/Server/Handlers/Asset/Tests/AssetServerPostHandlerTests.cs
index 427fa16..faa6fb7 100644
--- a/OpenSim/Server/Handlers/Asset/Tests/AssetServerPostHandlerTests.cs
+++ b/OpenSim/Server/Handlers/Asset/Tests/AssetServerPostHandlerTests.cs
@@ -39,7 +39,6 @@ using OpenSim.Server.Handlers.Asset;
39using OpenSim.Services.AssetService; 39using OpenSim.Services.AssetService;
40using OpenSim.Services.Interfaces; 40using OpenSim.Services.Interfaces;
41using OpenSim.Tests.Common; 41using OpenSim.Tests.Common;
42using OpenSim.Tests.Common.Mock;
43 42
44namespace OpenSim.Server.Handlers.Asset.Test 43namespace OpenSim.Server.Handlers.Asset.Test
45{ 44{
diff --git a/OpenSim/Server/Handlers/BakedTextures/XBakesGetHandler.cs b/OpenSim/Server/Handlers/BakedTextures/XBakesGetHandler.cs
index 9e703f1..3c61673 100644
--- a/OpenSim/Server/Handlers/BakedTextures/XBakesGetHandler.cs
+++ b/OpenSim/Server/Handlers/BakedTextures/XBakesGetHandler.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Server.Handlers.BakedTextures
45{ 45{
46 public class BakesServerGetHandler : BaseStreamHandler 46 public class BakesServerGetHandler : BaseStreamHandler
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 49
50 private IBakedTextureService m_BakesService; 50 private IBakedTextureService m_BakesService;
51 private System.Text.UTF8Encoding utf8 = 51 private System.Text.UTF8Encoding utf8 =
diff --git a/OpenSim/Server/Handlers/BakedTextures/XBakesPostHandler.cs b/OpenSim/Server/Handlers/BakedTextures/XBakesPostHandler.cs
index 1aacbc9..e38543b 100644
--- a/OpenSim/Server/Handlers/BakedTextures/XBakesPostHandler.cs
+++ b/OpenSim/Server/Handlers/BakedTextures/XBakesPostHandler.cs
@@ -45,13 +45,10 @@ namespace OpenSim.Server.Handlers.BakedTextures
45{ 45{
46 public class BakesServerPostHandler : BaseStreamHandler 46 public class BakesServerPostHandler : BaseStreamHandler
47 { 47 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 49
50 private IBakedTextureService m_BakesService; 50 private IBakedTextureService m_BakesService;
51 51
52 private System.Text.UTF8Encoding utf8 =
53 new System.Text.UTF8Encoding();
54
55 public BakesServerPostHandler(IBakedTextureService service, IServiceAuth auth) : 52 public BakesServerPostHandler(IBakedTextureService service, IServiceAuth auth) :
56 base("POST", "/bakes", auth) 53 base("POST", "/bakes", auth)
57 { 54 {
@@ -76,4 +73,4 @@ namespace OpenSim.Server.Handlers.BakedTextures
76 return new byte[0]; 73 return new byte[0];
77 } 74 }
78 } 75 }
79} 76} \ No newline at end of file
diff --git a/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs b/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs
index f8f1d00..49aa8ba 100644
--- a/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs
+++ b/OpenSim/Server/Handlers/Profiles/UserProfilesHandlers.cs
@@ -263,8 +263,7 @@ namespace OpenSim.Server.Handlers
263 m_log.DebugFormat ("Avatar Notes Request"); 263 m_log.DebugFormat ("Avatar Notes Request");
264 return false; 264 return false;
265 } 265 }
266 266
267 string result = string.Empty;
268 UserProfileNotes note = new UserProfileNotes(); 267 UserProfileNotes note = new UserProfileNotes();
269 object Note = (object)note; 268 object Note = (object)note;
270 OSD.DeserializeMembers(ref Note, (OSDMap)json["params"]); 269 OSD.DeserializeMembers(ref Note, (OSDMap)json["params"]);
@@ -403,7 +402,7 @@ namespace OpenSim.Server.Handlers
403 402
404 response.Error.Code = ErrorCode.InternalError; 403 response.Error.Code = ErrorCode.InternalError;
405 response.Error.Message = string.Format("{0}", result); 404 response.Error.Message = string.Format("{0}", result);
406 m_log.InfoFormat("[PROFILES]: User preferences request error - {0}", response.Error.Message); 405// m_log.InfoFormat("[PROFILES]: User preferences request error - {0}", response.Error.Message);
407 return false; 406 return false;
408 } 407 }
409 408
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index da2bfeb..81c9df2 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -182,7 +182,8 @@ namespace OpenSim.Server.Handlers.Simulation
182 if (action.Equals("release")) 182 if (action.Equals("release"))
183 ReleaseAgent(regionID, id); 183 ReleaseAgent(regionID, id);
184 else 184 else
185 Util.FireAndForget(delegate { m_SimulationService.CloseAgent(destination, id, auth_token); }); 185 Util.FireAndForget(
186 o => m_SimulationService.CloseAgent(destination, id, auth_token), null, "AgentHandler.DoAgentDelete");
186 187
187 responsedata["int_response_code"] = HttpStatusCode.OK; 188 responsedata["int_response_code"] = HttpStatusCode.OK;
188 responsedata["str_response_string"] = "OpenSim agent " + id.ToString(); 189 responsedata["str_response_string"] = "OpenSim agent " + id.ToString();