mgmt: fix conflicting TLV-TYPE assignment
Amends df5053824fc53eec6847067faa2da8b0ebb69917
Change-Id: Ifba9fcac63528594c6442973adce313a95116c75
Refs: #4318, #4538
diff --git a/src/mgmt/nfd/control-parameters.cpp b/src/mgmt/nfd/control-parameters.cpp
index c0377c5..65360a5 100644
--- a/src/mgmt/nfd/control-parameters.cpp
+++ b/src/mgmt/nfd/control-parameters.cpp
@@ -52,20 +52,19 @@
size_t totalLength = 0;
if (this->hasDefaultCongestionThreshold()) {
- totalLength += prependNonNegativeIntegerBlock(encoder,
- tlv::nfd::DefaultCongestionThreshold, m_defaultCongestionThreshold);
+ totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::DefaultCongestionThreshold,
+ m_defaultCongestionThreshold);
}
if (this->hasBaseCongestionMarkingInterval()) {
- totalLength += prependNonNegativeIntegerBlock(encoder,
- tlv::nfd::BaseCongestionMarkingInterval, m_baseCongestionMarkingInterval.count());
+ totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::BaseCongestionMarkingInterval,
+ m_baseCongestionMarkingInterval.count());
}
if (this->hasFacePersistency()) {
- totalLength += prependNonNegativeIntegerBlock(encoder,
- tlv::nfd::FacePersistency, m_facePersistency);
+ totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::FacePersistency, m_facePersistency);
}
if (this->hasExpirationPeriod()) {
- totalLength += prependNonNegativeIntegerBlock(encoder,
- tlv::nfd::ExpirationPeriod, m_expirationPeriod.count());
+ totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::ExpirationPeriod,
+ m_expirationPeriod.count());
}
if (this->hasStrategy()) {
totalLength += prependNestedBlock(encoder, tlv::nfd::Strategy, m_strategy);
@@ -76,8 +75,8 @@
if (this->hasFlags()) {
totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::Flags, m_flags);
}
- if (this->hasNCsEntries()) {
- totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NCsEntries, m_nCsEntries);
+ if (this->hasCount()) {
+ totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::Count, m_count);
}
if (this->hasCapacity()) {
totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::Capacity, m_capacity);
@@ -176,10 +175,10 @@
m_capacity = readNonNegativeInteger(*val);
}
- val = m_wire.find(tlv::nfd::NCsEntries);
- m_hasFields[CONTROL_PARAMETER_N_CS_ENTRIES] = val != m_wire.elements_end();
- if (this->hasNCsEntries()) {
- m_nCsEntries = readNonNegativeInteger(*val);
+ val = m_wire.find(tlv::nfd::Count);
+ m_hasFields[CONTROL_PARAMETER_COUNT] = val != m_wire.elements_end();
+ if (this->hasCount()) {
+ m_count = readNonNegativeInteger(*val);
}
val = m_wire.find(tlv::nfd::Flags);
@@ -337,8 +336,8 @@
os << "Capacity: " << parameters.getCapacity() << ", ";
}
- if (parameters.hasNCsEntries()) {
- os << "NCsEntries: " << parameters.getNCsEntries() << ", ";
+ if (parameters.hasCount()) {
+ os << "Count: " << parameters.getCount() << ", ";
}
if (parameters.hasFlags()) {