From: Thomas Markwalder Date: Mon, 8 Jul 2019 12:28:12 +0000 (-0400) Subject: [#722,!1] Addressed review comments X-Git-Tag: Kea-1.6.0~41^2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afa16f63ea0280fe8c682cec19fe635b3a590b12;p=thirdparty%2Fkea.git [#722,!1] Addressed review comments src/lib/dhcp/duid.cc - improved log message --- diff --git a/src/lib/dhcp/duid.cc b/src/lib/dhcp/duid.cc index bd12e0ec95..011325785d 100644 --- a/src/lib/dhcp/duid.cc +++ b/src/lib/dhcp/duid.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2012-2016 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2012-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -22,8 +22,8 @@ namespace dhcp { DUID::DUID(const std::vector& duid) { if (duid.size() > MAX_DUID_LEN) { - isc_throw(isc::BadValue, "DUID is " << duid.size() - << ", exceeds max of " << MAX_DUID_LEN); + isc_throw(isc::BadValue, "DUID size is " << duid.size() + << " bytes, exceeds maximum of " << MAX_DUID_LEN); } if (duid.empty()) { isc_throw(isc::BadValue, "Empty DUIDs are not allowed"); @@ -33,8 +33,8 @@ DUID::DUID(const std::vector& duid) { DUID::DUID(const uint8_t* data, size_t len) { if (len > MAX_DUID_LEN) { - isc_throw(isc::BadValue, "DUID is " << len - << ", exceeds max of " << MAX_DUID_LEN); + isc_throw(isc::BadValue, "DUID size is " << len + << " bytes, exceeds maximum of " << MAX_DUID_LEN); } if (len == 0) { isc_throw(isc::BadValue, "Empty DUIDs/Client-ids not allowed"); @@ -46,7 +46,6 @@ DUID::DUID(const uint8_t* data, size_t len) { const std::vector& DUID::getDuid() const { return (duid_); } - DUID::DUIDType DUID::getType() const { if (duid_.size() < 2) { return (DUID_UNKNOWN);