fw: Add unsolicited data forwarder counter
Change-Id: I47650e270f0305e34fb4ec9713802671ac96a4cb
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 1bc0acc..67b8f52 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -387,13 +387,14 @@
Forwarder::onDataUnsolicited(const FaceEndpoint& ingress, const Data& data)
{
// accept to cache?
- fw::UnsolicitedDataDecision decision = m_unsolicitedDataPolicy->decide(ingress.face, data);
+ auto decision = m_unsolicitedDataPolicy->decide(ingress.face, data);
if (decision == fw::UnsolicitedDataDecision::CACHE) {
// CS insert
m_cs.insert(data, true);
}
NFD_LOG_DEBUG("onDataUnsolicited in=" << ingress << " data=" << data.getName() << " decision=" << decision);
+ ++m_counters.nUnsolicitedData;
}
void