fw: rename n-silent-timeouts to max-timeouts in AsfStrategy

Change-Id: Ie2790a4e1fd545aacf8b297d7ec33b204f2cdbfc
diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index f337a27..df38099 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.cpp
@@ -58,7 +58,7 @@
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 
   NFD_LOG_DEBUG("probing-interval=" << m_probing.getProbingInterval()
-                << " n-silent-timeouts=" << m_nMaxSilentTimeouts);
+                << " max-timeouts=" << m_nMaxTimeouts);
 }
 
 const Name&
@@ -97,11 +97,13 @@
     if (f == "probing-interval") {
       m_probing.setProbingInterval(getParamValue(f, s));
     }
-    else if (f == "n-silent-timeouts") {
-      m_nMaxSilentTimeouts = getParamValue(f, s);
+    else if (f == "max-timeouts") {
+      m_nMaxTimeouts = getParamValue(f, s);
+      if (m_nMaxTimeouts <= 0)
+        NDN_THROW(std::invalid_argument("max-timeouts should be greater than 0"));
     }
     else {
-      NDN_THROW(std::invalid_argument("Parameter should be probing-interval or n-silent-timeouts"));
+      NDN_THROW(std::invalid_argument("Parameter should be probing-interval or max-timeouts"));
     }
   }
 }
@@ -341,10 +343,10 @@
   }
 
   auto& faceInfo = *fiPtr;
-  size_t nTimeouts = faceInfo.getNSilentTimeouts() + 1;
-  faceInfo.setNSilentTimeouts(nTimeouts);
+  size_t nTimeouts = faceInfo.getNTimeouts() + 1;
+  faceInfo.setNTimeouts(nTimeouts);
 
-  if (nTimeouts <= m_nMaxSilentTimeouts && !isNack) {
+  if (nTimeouts < m_nMaxTimeouts && !isNack) {
     NFD_LOG_TRACE(interestName << " face=" << faceId << " timeout-count=" << nTimeouts << " ignoring");
     // Extend lifetime for measurements associated with Face
     namespaceInfo->extendFaceInfoLifetime(faceInfo, faceId);