mirror of
https://gitlab.isc.org/isc-projects/kea.git
synced 2025-12-20 00:53:34 +08:00
[#4144] Address review
This commit is contained in:
@@ -35,7 +35,7 @@ BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: false
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
ColumnLimit: 100
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
|
||||
@@ -56,7 +56,8 @@ public:
|
||||
///
|
||||
/// Deregisters all commands except 'list-commands'.
|
||||
CtrlAgentCommandMgrTest()
|
||||
: DControllerTest(CtrlAgentController::instance), mgr_(CtrlAgentCommandMgr::instance()),
|
||||
: DControllerTest(CtrlAgentController::instance),
|
||||
mgr_(CtrlAgentCommandMgr::instance()),
|
||||
skipped_(false) {
|
||||
mgr_.deregisterAll();
|
||||
setSocketTestPath();
|
||||
|
||||
@@ -42,7 +42,8 @@ public:
|
||||
setSocketTestPath();
|
||||
socket_name_too_long_ = SocketPath::isTooLong(SocketPath::unixSocketFilePath());
|
||||
if (!socket_name_too_long_) {
|
||||
test_socket_.reset(new TestServerUnixSocket(io_service_, SocketPath::unixSocketFilePath()));
|
||||
test_socket_.reset(
|
||||
new TestServerUnixSocket(io_service_, SocketPath::unixSocketFilePath()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ struct SocketPath {
|
||||
/// @return whether the socket name is too long
|
||||
static bool isTooLong(std::string const& socket_name) {
|
||||
try {
|
||||
std::string const validated_socket_name(UnixCommandConfig::validatePath(socket_name));
|
||||
isc::asiolink::UnixDomainSocketEndpoint endpoint(validated_socket_name);
|
||||
std::string const validated(UnixCommandConfig::validatePath(socket_name));
|
||||
isc::asiolink::UnixDomainSocketEndpoint endpoint(validated);
|
||||
} catch (std::exception const& e) {
|
||||
// Check if it starts with it.
|
||||
std::string const search_for("name too long");
|
||||
@@ -65,7 +65,9 @@ struct SocketPath {
|
||||
for (ConstElementPtr control_socket : control_sockets->listValue()) {
|
||||
ConstElementPtr socket_name(control_socket->get("socket-name"));
|
||||
ConstElementPtr socket_type(control_socket->get("socket-type"));
|
||||
if (socket_name && socket_name->getType() == Element::string && socket_type &&
|
||||
if (socket_name &&
|
||||
socket_name->getType() == Element::string &&
|
||||
socket_type &&
|
||||
socket_type->getType() == Element::string &&
|
||||
socket_type->stringValue() == "unix") {
|
||||
std::string const name(socket_name->stringValue());
|
||||
|
||||
Reference in New Issue
Block a user