miniupnpd: Add command line parsing for clean_ruleset_interval option

This commit is contained in:
Thomas Bernard 2012-06-29 21:45:45 +02:00
parent 0df9f7f62a
commit 6de4711f8b
2 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,7 @@ $Id: Changelog.txt,v 1.292 2012/06/29 19:26:07 nanard Exp $
2012/06/29:
added DISABLE_CONFIG_FILE in options.h to disable miniupnpd.conf parsing
Add command line parsing for clean_ruleset_interval option
2012/06/28:
Only activate -L option for PF and IPF

View File

@ -852,6 +852,12 @@ init(int argc, char * * argv, struct runtime_vars * v)
else
fprintf(stderr, "Option -%c takes one argument.\n", argv[i][1]);
break;
case 'r':
if(i+1 < argc)
v->clean_ruleset_interval = atoi(argv[++i]);
else
fprintf(stderr, "Option -%c takes one argument.\n", argv[i][1]);
break;
case 'u':
if(i+1 < argc)
strncpy(uuidvalue+5, argv[++i], strlen(uuidvalue+5) + 1);
@ -1169,7 +1175,7 @@ print_usage:
/*"[-l logfile] " not functionnal */
"\t\t[-u uuid] [-s serial] [-m model_number] \n"
"\t\t[-t notify_interval] [-P pid_filename]\n"
"\t\t[-B down up] [-w url]\n"
"\t\t[-B down up] [-w url] [-r clean_ruleset_interval]\n"
#ifdef USE_PF
"\t\t[-q queue] [-T tag]\n"
#endif