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/pracrod.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/pracrod.cc')
-rw-r--r-- | server/src/pracrod.cc | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/server/src/pracrod.cc b/server/src/pracrod.cc index dff00d9..c668159 100644 --- a/server/src/pracrod.cc +++ b/server/src/pracrod.cc @@ -82,8 +82,9 @@ static const char usage_str[] = " -h, --help Print this message and exit.\n" ; -void reload(int fisk) +void reload(int) { + /* int port; printf("Reload!\n"); port = config()->lookup("port"); @@ -93,6 +94,7 @@ void reload(int fisk) TCPSocket socket; socket.connect("localhost", port); } + */ } class PracroDaemon : public Daemon { @@ -167,33 +169,24 @@ int main(int argc, char *argv[]) } } + // Load config + /* char defval[512]; sprintf(defval, ETC"/pracrod.conf"); - char *cfname = NULL; if(!configfile) cfname = defval;//ETC"/pracrod.conf"; else cfname = configfile; Configuration conf(cfname); initConfig(&conf); + */ if(!user) { - std::string userstr; - try { - user = (char*)(const char*)config()->lookup("user"); - } catch( ... ) { - printf("User not found in config.\n"); - } + user = strdup(Conf::server_user.c_str()); } if(!group) { - std::string groupstr; - try { - group = (char*)(const char*)config()->lookup("group"); - } catch( ... ) { - printf("Group not found in config.\n"); - } - + group = strdup(Conf::server_group.c_str()); } PracroDaemon daemon; |