From 6de4711f8b6982e95f972b4469425a38d2501c60 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Fri, 29 Jun 2012 21:45:45 +0200 Subject: [PATCH] miniupnpd: Add command line parsing for clean_ruleset_interval option --- miniupnpd/Changelog.txt | 1 + miniupnpd/miniupnpd.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/miniupnpd/Changelog.txt b/miniupnpd/Changelog.txt index 952a0de..a27b118 100644 --- a/miniupnpd/Changelog.txt +++ b/miniupnpd/Changelog.txt @@ -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 diff --git a/miniupnpd/miniupnpd.c b/miniupnpd/miniupnpd.c index f41477b..fbad82c 100644 --- a/miniupnpd/miniupnpd.c +++ b/miniupnpd/miniupnpd.c @@ -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