Host::addClientClassInternal(ClientClasses& classes,
const std::string& class_name) {
std::string trimmed = util::str::trim(class_name);
- if (!class_name.empty()) {
- classes.insert(ClientClass(class_name));
+ if (!trimmed.empty()) {
+ classes.insert(ClientClass(trimmed));
}
}
/// custom handling of a SIGCHLD signal, and the conversion of the
/// arguments of the executable from the STL container to the array.
///
-/// Made noncopyable to avoid problems with global operations
+/// This class is made noncopyable so that we don't have attempts
+/// to make multiple copies of an object. This avoid problems
+/// with multiple copies of objects for a single global resource
+/// such as the SIGCHLD signal handler. In addition making it
+/// noncopyable keeps the static check codd from flagging the
+/// lack of a copy constructor as an issue.
class ProcessSpawnImpl : boost::noncopyable {
public:
/// attempt to register a new SIGCHLD signal handler and, as a
/// consequence, the new @c ProcessSpawn object will fail to create.
///
-/// Made noncopyable to avoid problems with global operations
+/// This class is made noncopyable so that we don't have attempts
+/// to make multiple copies of an object. This avoid problems
+/// with multiple copies of objects for a single global resource
+/// such as the SIGCHLD signal handler. In addition making it
+/// noncopyable keeps the static check codd from flagging the
+/// lack of a copy constructor as an issue.
///
/// @todo The SIGCHLD handling logic should be moved to the @c SignalSet
/// class so as multiple instances of the @c ProcessSpawn use the same
-// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
time_t cltt = time(NULL); // Timestamp
uint32_t pool_id = 0; // Let's use pools 0-99
bool fixed = false;
- string hostname("foo"); // Will generate it dynamically
+ // Hostname will be generated dynamically
bool fqdn_fwd = true; // Let's pretend to do AAAA update
bool fqdn_rev = true; // Let's pretend to do PTR update