diff options
author | deva <deva> | 2008-08-21 10:00:09 +0000 |
---|---|---|
committer | deva <deva> | 2008-08-21 10:00:09 +0000 |
commit | 8e1f28fdd6908a852dd0d11ea868fef965b89790 (patch) | |
tree | 83046052234ef0b03818541275fd4ffb1aaf51a2 /server/src/configurationparser.cc | |
parent | d3ea5701baadcdbc6df8775d88f173e52936307a (diff) |
Made postgres addr, username and password configurable.
Diffstat (limited to 'server/src/configurationparser.cc')
-rw-r--r-- | server/src/configurationparser.cc | 19 |
1 files changed, 19 insertions, 0 deletions
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( ... ) { + } + } |