BIND 10 trac1954, updated. 6fb56baf17fbb2d8e666bfd7c16138f2a3ae5a44 [1954] Removed boost/tokenizer as it has unused parameters that crash build
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon May 21 13:56:58 UTC 2012
The branch, trac1954 has been updated
via 6fb56baf17fbb2d8e666bfd7c16138f2a3ae5a44 (commit)
from 38d2dadf3b24367b9d967d23fe700899ddd752f4 (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 6fb56baf17fbb2d8e666bfd7c16138f2a3ae5a44
Author: Marcin Siodelski <marcin at isc.org>
Date: Mon May 21 15:56:29 2012 +0200
[1954] Removed boost/tokenizer as it has unused parameters that crash build
-----------------------------------------------------------------------
Summary of changes:
tests/tools/perfdhcp/command_options.cc | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
-----------------------------------------------------------------------
diff --git a/tests/tools/perfdhcp/command_options.cc b/tests/tools/perfdhcp/command_options.cc
index 09bc61e..92332cc 100644
--- a/tests/tools/perfdhcp/command_options.cc
+++ b/tests/tools/perfdhcp/command_options.cc
@@ -20,7 +20,6 @@
#include <unistd.h>
#include <boost/algorithm/string.hpp>
-#include <boost/tokenizer.hpp>
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
@@ -365,26 +364,25 @@ CommandOptions::decodeBase(const std::string& base) {
void
CommandOptions::decodeMac(const std::string& base) {
- typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
-
// Strip string from mac=
size_t found = base.find('=');
check(found == std::string::npos, "expected -b<base> format for MAC address is -b MAC=00::0C::01::02::03::04");
- // Tokenize remaining part of the argument to get pieces of MAC address
- boost::char_separator<char> sep(":-");
- tokenizer tokens(base.substr(found + 1), sep);
- std::vector<std::string> stokens(tokens.begin(), tokens.end());
- check(stokens.size() != 6, "expected -b<base> format for MAC address is -b MAC=00::0C::01::02::03::04");
+ // Decode MAC address to vector of uint8_t
+ std::istringstream s1(base.substr(found+1));
+ std::string token;
mac_prefix_.resize(0);
- BOOST_FOREACH(std::string t, stokens) {
- std::istringstream ss(t);
+ while (std::getline(s1, token, ':')) {
unsigned int ui = 0;
- ss >> std::hex >> ui >> std::dec;
- check(ss.fail() || (ui > 0xFF),
- "expected -b<base> format for MAC address is -b MAC=00::0C::01::02::03::04");
- mac_prefix_.push_back(static_cast<uint8_t>(ui));
+ std::istringstream s2(token);
+ if (token.length() > 0) {
+ s2 >> std::hex >> ui >> std::dec;
+ check(s2.fail() || (ui > 0xFF),
+ "expected -b<base> format for MAC address is -b MAC=00::0C::01::02::03::04");
+ mac_prefix_.push_back(ui);
+ }
}
+ check(mac_prefix_.size() != 6, "expected -b<base> format for MAC address is -b MAC=00::0C::01::02::03::04");
}
void
More information about the bind10-changes
mailing list