BIND 10 trac2272, updated. 3dc84c3cc22866efa60bb7a2701c50b05049971d [2272] Check for HAVE_OPTRESET in the perfdhcp command options.
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Sep 20 09:34:47 UTC 2012
The branch, trac2272 has been updated
via 3dc84c3cc22866efa60bb7a2701c50b05049971d (commit)
from 7bedb1f498bf26780a3262a47b7850f9b92288bc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3dc84c3cc22866efa60bb7a2701c50b05049971d
Author: Marcin Siodelski <marcin at isc.org>
Date: Thu Sep 20 11:34:34 2012 +0200
[2272] Check for HAVE_OPTRESET in the perfdhcp command options.
-----------------------------------------------------------------------
Summary of changes:
tests/tools/perfdhcp/command_options.cc | 9 +++++++++
1 file changed, 9 insertions(+)
-----------------------------------------------------------------------
diff --git a/tests/tools/perfdhcp/command_options.cc b/tests/tools/perfdhcp/command_options.cc
index 24e7e79..91c5819 100644
--- a/tests/tools/perfdhcp/command_options.cc
+++ b/tests/tools/perfdhcp/command_options.cc
@@ -113,6 +113,15 @@ CommandOptions::parse(int argc, char** const argv) {
optind = 1;
#endif
+ // optreset is declared on BSD systems and is used to reset internal
+ // state of getopt(). When parsing command line arguments multiple
+ // times with getopt() the optreset must be set to 1 every time before
+ // parsing starts. Failing to do so will result in random behavior of
+ // getopt().
+#ifdef HAVE_OPTRESET
+ optreset = 1;
+#endif
+
opterr = 0;
// Reset values of class members
More information about the bind10-changes
mailing list