Roxen.git/
server/
base_server/
configuration.pike
Branch:
Tag:
Non-build tags
All tags
No tags
1997-08-25
1997-08-25 17:18:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>
eb7a4f97588d60f0fc42b8ccaf7f4112525415b6 (
25
lines) (+
16
/-
9
)
[
Show
|
Annotate
]
Branch:
eb7a4f97588d60f0fc42b8ccaf7f4112525415b6
Improved start-up message.
Rev: server/base_server/configuration.pike:1.65
1:
-
string cvs_version = "$Id: configuration.pike,v 1.
64
1997/08/
23
01
:
29
:
32
grubba Exp $";
+
string cvs_version = "$Id: configuration.pike,v 1.
65
1997/08/
25
17
:
18
:
17
grubba Exp $";
#include <module.h> #include <roxen.h> /* A configuration.. */
1347:
void start(int num) {
-
array port
, erro
;
+
array port;
int possfd; int err=0; object lf;
1357:
init_log_file(); map(indices(open_ports), do_dest);
-
perror("Opening ports for "+query_name()+" ");
+
perror("Opening ports for "+query_name()+"
...
");
foreach(query("Ports"), port ) {
-
+
array old = port;
+
mixed erro;
erro = catch { array tmp; function rp;
-
array old = port;
+
object o; if ((< "ssl", "ssleay" >)[port[1]]) { // Obsolete versions of the SSL protocol. report_warning("Obsolete SSL protocol-module \""+port[1]+"\".\n" "Converted to SSL3.\n");
-
+
// Note: Change in-place.
port[1] = "ssl3";
-
+
// FIXME: Should probably mark node as changed.
}
-
if(rp = ((object)("protocols/"+port[1]))->real_port)
+
perror(port[0]+" "+port[2]+" ("+port[1]+")... ");
+
if(rp = ((object)("protocols/"+port[1]))->real_port)
{
if(tmp = rp(port, this_object())) port = tmp;
-
+
}
object privs; if(port[0] < 1024) privs = ((program)"privs")("Opening listen port below 1024");
-
perror("... "+port[0]+" "+port[2]+" ("+port[1]+") ");
+
if(!(o=create_listen_socket(port[0], this, port[2], (program)("protocols/"+port[1])))) {
-
perror
("I failed to open the port "+old[0]+" at "+old[2]
-
+
" ("+old[1]+")\n");
+
report_error
("I failed to open the port "+old[0]+" at "+old[2]
+
+
" ("+old[1]+")\n");
err++; } else open_ports[o]=old; }; if(erro) {
-
perror
("
Error
:
\n
"
+describe
_backtrace(erro));
+
report_error
("
Failed to open port "+old[0]+" at "+old[2]+
+
" ("+old[1]+")
:
"
+
+
(stringp(erro)?erro:describe
_backtrace(erro))
)
;
} perror("\n"); }