diff options
author | deva <deva> | 2008-07-30 11:33:15 +0000 |
---|---|---|
committer | deva <deva> | 2008-07-30 11:33:15 +0000 |
commit | 71ac37ecfaf5dff76c8880b62228c30bd207054b (patch) | |
tree | 3d0074544ae1141bb9154884de69ece62e8a3519 /server/src/server.cc | |
parent | b3b694c8dd17955aec463f50c6f526f570d8b97f (diff) |
Added global Conf namepsace with configuration values. These are to be filled with config file values later.
Diffstat (limited to 'server/src/server.cc')
-rw-r--r-- | server/src/server.cc | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/server/src/server.cc b/server/src/server.cc index 20fd856..1bd0ccf 100644 --- a/server/src/server.cc +++ b/server/src/server.cc @@ -133,7 +133,7 @@ static void connection(TCPSocket &socket) #ifndef WITHOUT_PENTOMINOS // Send the queries to Pentominos (if any) TCPSocket s; - s.connect("localhost", 11108); + s.connect(Conf::pentominos_addr, Conf::pentominos_port); QueryHandler qh(&s, transaction.cpr); std::vector< Macro >::iterator mi = templ->course.macroes.begin(); @@ -212,14 +212,7 @@ static void connection(TCPSocket &socket) void server() { - int port; - try { - port = config()->lookup("port"); - } catch( ... ) { - fprintf(stderr, "Could not read port."); - return; - } - + port_t port = Conf::server_port; TCPSocket *socket = NULL; try { @@ -237,12 +230,7 @@ void server() { // Reload if new port is assigned. int old_port = port; - try { - port = config()->lookup("port"); - } catch( ... ) { - fprintf(stderr, "Could not read port."); - return; - } + port = Conf::server_port; if(port != old_port) { // Start listening on the new port |