fix: typo in config parser concerning the --default_file flag

This commit is contained in:
Gu://em_ 2025-11-20 18:32:38 +01:00
parent 0982f2bf3a
commit 747b3f7698
2 changed files with 17 additions and 15 deletions

View file

@ -7,3 +7,4 @@ server_name = my_server
ip = 127.0.0.1 ip = 127.0.0.1
port = 6996 port = 6996
root_dir = . root_dir = .
default_file='/dev/null'

View file

@ -180,7 +180,8 @@ static void print_arg_error(int err, char **argv, struct option options[],
struct config *parse_configuration(int argc, char *argv[]) struct config *parse_configuration(int argc, char *argv[])
{ {
struct option options[] = { // Global struct option options[] = {
// Global
{ "daemon", required_argument, NULL, 'd' }, { "daemon", required_argument, NULL, 'd' },
{ "help", no_argument, NULL, 'h' }, { "help", no_argument, NULL, 'h' },
// Vhosts // Vhosts
@ -188,7 +189,7 @@ struct config *parse_configuration(int argc, char *argv[])
{ "port", required_argument, NULL, 'p' }, { "port", required_argument, NULL, 'p' },
{ "ip", required_argument, NULL, 'i' }, { "ip", required_argument, NULL, 'i' },
{ "root_dir", required_argument, NULL, 'r' }, { "root_dir", required_argument, NULL, 'r' },
{ "defaut_file", required_argument, NULL, 'D' }, { "default_file", required_argument, NULL, 'D' },
// Logging // Logging
{ "pid_file", required_argument, NULL, 'P' }, { "pid_file", required_argument, NULL, 'P' },
{ "log_file", required_argument, NULL, 'L' }, { "log_file", required_argument, NULL, 'L' },