Added processEvents() call to TorrentManager and update clients to use it including adding a seed method to the FetchStratedegyManager to seed data.
Change-Id: I98e4c794c98ca35765df968c2cf7c4fe1e622595
diff --git a/src/sequential-data-fetcher.cpp b/src/sequential-data-fetcher.cpp
index 971b59f..5873374 100644
--- a/src/sequential-data-fetcher.cpp
+++ b/src/sequential-data-fetcher.cpp
@@ -80,6 +80,7 @@
".appdata/manifests/",
bind(&SequentialDataFetcher::onManifestReceived, this, _1),
bind(&SequentialDataFetcher::onDataRetrievalFailure, this, _1, _2));
+ m_manager->processEvents();
}
}
@@ -90,6 +91,7 @@
m_manager->download_data_packet(*i,
bind(&SequentialDataFetcher::onDataPacketReceived, this, _1),
bind(&SequentialDataFetcher::onDataRetrievalFailure, this, _1, _2));
+ m_manager->processEvents();
}
}
@@ -133,7 +135,7 @@
const std::string& errorCode)
{
std::cerr << "Data Retrieval Failed: " << interest.getName() << std::endl;
-
+
// Data retrieval failure
uint32_t nameType = IoUtil::findType(interest.getName());
if (nameType == IoUtil::TORRENT_FILE) {