fix: typo in config parser concerning the --default_file flag
This commit is contained in:
parent
0982f2bf3a
commit
747b3f7698
2 changed files with 17 additions and 15 deletions
|
|
@ -7,3 +7,4 @@ server_name = my_server
|
|||
ip = 127.0.0.1
|
||||
port = 6996
|
||||
root_dir = .
|
||||
default_file='/dev/null'
|
||||
|
|
|
|||
|
|
@ -180,21 +180,22 @@ static void print_arg_error(int err, char **argv, struct option options[],
|
|||
|
||||
struct config *parse_configuration(int argc, char *argv[])
|
||||
{
|
||||
struct option options[] = { // Global
|
||||
{ "daemon", required_argument, NULL, 'd' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
// Vhosts
|
||||
{ "server_name", required_argument, NULL, 's' },
|
||||
{ "port", required_argument, NULL, 'p' },
|
||||
{ "ip", required_argument, NULL, 'i' },
|
||||
{ "root_dir", required_argument, NULL, 'r' },
|
||||
{ "defaut_file", required_argument, NULL, 'D' },
|
||||
// Logging
|
||||
{ "pid_file", required_argument, NULL, 'P' },
|
||||
{ "log_file", required_argument, NULL, 'L' },
|
||||
{ "log", required_argument, NULL, 'l' },
|
||||
// End
|
||||
{ NULL, 0, NULL, 0 }
|
||||
struct option options[] = {
|
||||
// Global
|
||||
{ "daemon", required_argument, NULL, 'd' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
// Vhosts
|
||||
{ "server_name", required_argument, NULL, 's' },
|
||||
{ "port", required_argument, NULL, 'p' },
|
||||
{ "ip", required_argument, NULL, 'i' },
|
||||
{ "root_dir", required_argument, NULL, 'r' },
|
||||
{ "default_file", required_argument, NULL, 'D' },
|
||||
// Logging
|
||||
{ "pid_file", required_argument, NULL, 'P' },
|
||||
{ "log_file", required_argument, NULL, 'L' },
|
||||
{ "log", required_argument, NULL, 'l' },
|
||||
// End
|
||||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
struct config *config = calloc(1, sizeof(struct config));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue