mgmt: don't extend the dataset expiration in ForwarderStatusManager
No other managers do this. Moreover, StatusDatasetContext::setExpiry()
has odd semantics and is being removed from ndn-cxx.
Change-Id: I5255aec5c6464e48f4b4765ae2c06f557e094044
diff --git a/daemon/mgmt/forwarder-status-manager.cpp b/daemon/mgmt/forwarder-status-manager.cpp
index e0a19d2..5d4cb4d 100644
--- a/daemon/mgmt/forwarder-status-manager.cpp
+++ b/daemon/mgmt/forwarder-status-manager.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,8 +29,6 @@
namespace nfd {
-static const time::milliseconds STATUS_FRESHNESS(5000);
-
ForwarderStatusManager::ForwarderStatusManager(Forwarder& forwarder, Dispatcher& dispatcher)
: m_forwarder(forwarder)
, m_dispatcher(dispatcher)
@@ -55,7 +53,7 @@
status.setNMeasurementsEntries(m_forwarder.getMeasurements().size());
status.setNCsEntries(m_forwarder.getCs().size());
- const ForwarderCounters& counters = m_forwarder.getCounters();
+ const auto& counters = m_forwarder.getCounters();
status.setNInInterests(counters.nInInterests)
.setNOutInterests(counters.nOutInterests)
.setNInData(counters.nInData)
@@ -69,13 +67,11 @@
}
void
-ForwarderStatusManager::listGeneralStatus(const Name& topPrefix, const Interest& interest,
+ForwarderStatusManager::listGeneralStatus(const Name&, const Interest&,
ndn::mgmt::StatusDatasetContext& context)
{
- context.setExpiry(STATUS_FRESHNESS);
-
auto status = this->collectGeneralStatus();
- const Block& wire = status.wireEncode();
+ const auto& wire = status.wireEncode();
wire.parse();
for (const auto& subblock : wire.elements()) {
context.append(subblock);