aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Base/HttpServerBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Base/HttpServerBase.cs')
-rw-r--r--OpenSim/Server/Base/HttpServerBase.cs39
1 files changed, 21 insertions, 18 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));