summaryrefslogtreecommitdiff
path: root/server/src/server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/server.cc')
-rw-r--r--server/src/server.cc18
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