chunks+ping: follow ndn::Scheduler API changes
Refs: #4883
Change-Id: I8aa48fe4f0613f529763f2efaf799c5db48a0b2c
diff --git a/tools/chunks/catchunks/data-fetcher.cpp b/tools/chunks/catchunks/data-fetcher.cpp
index 7600016..43d5076 100644
--- a/tools/chunks/catchunks/data-fetcher.cpp
+++ b/tools/chunks/catchunks/data-fetcher.cpp
@@ -126,13 +126,13 @@
}
case lp::NackReason::CONGESTION: {
time::milliseconds backoffTime(static_cast<uint64_t>(std::pow(2, m_nCongestionRetries)));
- if (backoffTime > MAX_CONGESTION_BACKOFF_TIME)
+ if (backoffTime > MAX_CONGESTION_BACKOFF_TIME) {
backoffTime = MAX_CONGESTION_BACKOFF_TIME;
- else
+ }
+ else {
m_nCongestionRetries++;
-
- m_scheduler.scheduleEvent(backoffTime, bind(&DataFetcher::expressInterest, this,
- newInterest, self));
+ }
+ m_scheduler.schedule(backoffTime, [=] { expressInterest(newInterest, self); });
break;
}
default: {
diff --git a/tools/chunks/catchunks/pipeline-interests-adaptive.cpp b/tools/chunks/catchunks/pipeline-interests-adaptive.cpp
index 7e394ef..4ce277d 100644
--- a/tools/chunks/catchunks/pipeline-interests-adaptive.cpp
+++ b/tools/chunks/catchunks/pipeline-interests-adaptive.cpp
@@ -82,7 +82,7 @@
}
// schedule the event to check retransmission timer
- m_checkRtoEvent = m_scheduler.scheduleEvent(m_options.rtoCheckInterval, [this] { checkRto(); });
+ m_checkRtoEvent = m_scheduler.schedule(m_options.rtoCheckInterval, [this] { checkRto(); });
schedulePackets();
}
@@ -120,7 +120,7 @@
}
// schedule the next check after predefined interval
- m_checkRtoEvent = m_scheduler.scheduleEvent(m_options.rtoCheckInterval, [this] { checkRto(); });
+ m_checkRtoEvent = m_scheduler.schedule(m_options.rtoCheckInterval, [this] { checkRto(); });
}
void