Add -p PORT command-line parameter.
FIXME: at this point, the port parameter set in the configuration file will take precedence over the command-line argument. It should be the opposite.
This commit is contained in:
parent
f44d0f387b
commit
917ef9eec2
@ -173,7 +173,7 @@ process_cmdline (int argc, char **argv, struct config_s *conf)
|
||||
{
|
||||
int opt;
|
||||
|
||||
while ((opt = getopt (argc, argv, "c:vdh")) != EOF) {
|
||||
while ((opt = getopt (argc, argv, "c:p:vdh")) != EOF) {
|
||||
switch (opt) {
|
||||
case 'v':
|
||||
display_version ();
|
||||
@ -196,6 +196,10 @@ process_cmdline (int argc, char **argv, struct config_s *conf)
|
||||
}
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
conf->port = strtol(optarg, NULL, 10);
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
display_usage ();
|
||||
exit (EX_OK);
|
||||
|
Loading…
Reference in New Issue
Block a user