X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=server.c;h=4765cff4d45db856334e1e987f9c7ca5366fe6f1;hb=refs%2Ftags%2Fv0.3.2;hp=4f346e0c19d0dba2fad7d59719f3cd7c854a89be;hpb=806fcbb5a8c00d6b8c1a228b9b4d6b6758f613ca;p=paraslash.git diff --git a/server.c b/server.c index 4f346e0c..4765cff4 100644 --- a/server.c +++ b/server.c @@ -205,7 +205,7 @@ static void shm_init(void) mmd->sender_cmd_data.cmd_num = -1; return; err_out: - PARA_EMERG_LOG("%s", para_strerror(-ret)); + PARA_EMERG_LOG("%s\n", para_strerror(-ret)); exit(EXIT_FAILURE); } @@ -257,18 +257,13 @@ static void parse_config(int override) struct server_cmdline_parser_params params = { .override = override, .initialize = 0, - .check_required = 0, - .check_ambiguity = 0 + .check_required = 1, + .check_ambiguity = 0, + .print_errors = 1 }; server_cmdline_parser_config_file(cf, &conf, ¶ms); conf.daemon_given = tmp; } - /* logfile */ - if (!conf.logfile_given && conf.daemon_given) { - ret = -1; - PARA_EMERG_LOG("fatal: daemon option, but no log file given\n"); - goto out; - } if (conf.logfile_given) logfile = open_log(conf.logfile_arg); ret = 1; @@ -385,10 +380,16 @@ static unsigned server_init(int argc, char **argv) { /* connector's address information */ int sockfd; - + struct server_cmdline_parser_params params = { + .override = 0, + .initialize = 1, + .check_required = 0, + .check_ambiguity = 0, + .print_errors = 1 + }; init_random_seed(); /* parse command line options */ - server_cmdline_parser(argc, argv, &conf); + server_cmdline_parser_ext(argc, argv, &conf, ¶ms); HANDLE_VERSION_FLAG("server", conf); para_drop_privileges(conf.user_arg, conf.group_arg); /* parse config file, open log and set defaults */