From b34c506a90e9fe4eda22c5dec367179f5ca36d5c Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Wed, 20 Jan 2010 01:18:12 +0000 Subject: [PATCH] bug fix to ensure the --last-cmd re-parsing of command line args via getopt_long() has a reset index git-svn-id: file:///home/mbr/svn/fwknop/trunk@200 510a4753-2344-4c79-9c09-4d669213fbeb --- client/fwknop.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/fwknop.c b/client/fwknop.c index 0deae9a8..1cea8bd8 100644 --- a/client/fwknop.c +++ b/client/fwknop.c @@ -606,6 +606,10 @@ run_last_args(fko_cli_options_t *options) } fclose(args_file_ptr); + /* Reset the options index so we can run through them again. + */ + optind = 0; + config_init(options, argc_new, argv_new); }