src+tools: use segment fetcher start
jenkins: re-compile ChronoSync on ndn-cxx change
refs: #4464
Change-Id: Ia627e00b8f13bad0068e213a6019f62a84cad41a
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index ce77683..eae4a43 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -1002,12 +1002,12 @@
interest.setInterestLifetime(m_nlsr.getConfParameter().getLsaInterestLifetime());
NLSR_LOG_DEBUG("Fetching Data for LSA: " << interestName << " Seq number: " << seqNo);
- shared_ptr<ndn::util::SegmentFetcher> fetcher =
- ndn::util::SegmentFetcher::fetch(m_nlsr.getNlsrFace(), interest,
- m_nlsr.getValidator(),
- std::bind(&Lsdb::afterFetchLsa, this, _1, interestName),
- std::bind(&Lsdb::onFetchLsaError, this, _1, _2, interestName,
- timeoutCount, deadline, lsaName, seqNo));
+ auto fetcher = ndn::util::SegmentFetcher::start(m_nlsr.getNlsrFace(),
+ interest, m_nlsr.getValidator());
+
+ fetcher->onComplete.connect(std::bind(&Lsdb::afterFetchLsa, this, _1, interestName));
+ fetcher->onError.connect(std::bind(&Lsdb::onFetchLsaError, this, _1, _2, interestName,
+ timeoutCount, deadline, lsaName, seqNo));
m_lsaStorage.connectToFetcher(*fetcher);
m_nlsr.connectToFetcher(*fetcher);