mgmt: fix conflicting TLV-TYPE assignment
Amends df5053824fc53eec6847067faa2da8b0ebb69917
Change-Id: Ifba9fcac63528594c6442973adce313a95116c75
Refs: #4318, #4538
diff --git a/src/mgmt/nfd/control-command.cpp b/src/mgmt/nfd/control-command.cpp
index 556a0ed..07e8b17 100644
--- a/src/mgmt/nfd/control-command.cpp
+++ b/src/mgmt/nfd/control-command.cpp
@@ -275,11 +275,11 @@
{
m_requestValidator
.required(CONTROL_PARAMETER_NAME)
- .optional(CONTROL_PARAMETER_N_CS_ENTRIES);
+ .optional(CONTROL_PARAMETER_COUNT);
m_responseValidator
.required(CONTROL_PARAMETER_NAME)
.optional(CONTROL_PARAMETER_CAPACITY)
- .required(CONTROL_PARAMETER_N_CS_ENTRIES);
+ .required(CONTROL_PARAMETER_COUNT);
}
void
@@ -287,8 +287,8 @@
{
this->ControlCommand::validateRequest(parameters);
- if (parameters.hasNCsEntries() && parameters.getNCsEntries() == 0) {
- BOOST_THROW_EXCEPTION(ArgumentError("NCsEntries must be positive"));
+ if (parameters.hasCount() && parameters.getCount() == 0) {
+ BOOST_THROW_EXCEPTION(ArgumentError("Count must be positive"));
}
}