fw: hasPendingOutRecords considers Nack
refs #3545
Change-Id: I986187f58e60090518df2a55a8bd9c1f05771b03
diff --git a/daemon/fw/pit-algorithm.cpp b/daemon/fw/pit-algorithm.cpp
index ecc8acd..a9ef7ea 100644
--- a/daemon/fw/pit-algorithm.cpp
+++ b/daemon/fw/pit-algorithm.cpp
@@ -115,7 +115,10 @@
{
time::steady_clock::TimePoint now = time::steady_clock::now();
return std::any_of(pitEntry.out_begin(), pitEntry.out_end(),
- [&now] (const pit::OutRecord& outRecord) { return outRecord.getExpiry() >= now; });
+ [&now] (const pit::OutRecord& outRecord) {
+ return outRecord.getExpiry() >= now &&
+ outRecord.getIncomingNack() == nullptr;
+ });
}
} // namespace fw
diff --git a/daemon/fw/pit-algorithm.hpp b/daemon/fw/pit-algorithm.hpp
index f901316..ed47725 100644
--- a/daemon/fw/pit-algorithm.hpp
+++ b/daemon/fw/pit-algorithm.hpp
@@ -106,8 +106,7 @@
findDuplicateNonce(const pit::Entry& pitEntry, uint32_t nonce, const Face& face);
/** \brief determine whether \p pitEntry has any pending out-records
- * \return true if there is one or more unexpired OutRecords
- * \todo #3545 take Nack into consideration
+ * \return true if there is at least one out-record waiting for Data
*/
bool
hasPendingOutRecords(const pit::Entry& pitEntry);