]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#722,!1] Addressed review comments
authorThomas Markwalder <tmark@isc.org>
Mon, 8 Jul 2019 12:28:12 +0000 (08:28 -0400)
committerThomas Markwalder <tmark@isc.org>
Fri, 16 Aug 2019 20:08:12 +0000 (16:08 -0400)
    src/lib/dhcp/duid.cc - improved log message

src/lib/dhcp/duid.cc

index bd12e0ec9584e17b57b3b4ff124d37074e8171bf..011325785d273d77ad018ba2b7f95008f5edf520 100644 (file)
@@ -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<uint8_t>& 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<uint8_t>& 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<uint8_t>& DUID::getDuid() const {
     return (duid_);
 }
-
 DUID::DUIDType DUID::getType() const {
     if (duid_.size() < 2) {
         return (DUID_UNKNOWN);