From 8e1f28fdd6908a852dd0d11ea868fef965b89790 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 21 Aug 2008 10:00:09 +0000 Subject: Made postgres addr, username and password configurable. --- server/src/configurationparser.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'server/src/configurationparser.cc') diff --git a/server/src/configurationparser.cc b/server/src/configurationparser.cc index 3065907..6bab578 100644 --- a/server/src/configurationparser.cc +++ b/server/src/configurationparser.cc @@ -103,4 +103,23 @@ void ConfigurationParser::reload() Conf::pentominos_port = p; } catch( ... ) { } + + try { + std::string a = lookup("database_addr"); + Conf::database_addr = a; + } catch( ... ) { + } + + try { + std::string u = lookup("database_user"); + Conf::database_user = u; + } catch( ... ) { + } + + try { + std::string p = lookup("database_passwd"); + Conf::database_passwd = p; + } catch( ... ) { + } + } -- cgit v1.2.3