API change for closure. Return ParsedContentObject, not just content
Fixed bug in test/test-sync-core.cc: there should have been two independent schedulers
diff --git a/src/fetcher.cc b/src/fetcher.cc
index edbabb4..f009819 100644
--- a/src/fetcher.cc
+++ b/src/fetcher.cc
@@ -99,15 +99,15 @@
}
void
-Fetcher::OnData (uint32_t seqno, const Ccnx::Name &name, const Ccnx::Bytes &content)
+Fetcher::OnData (uint32_t seqno, const Ccnx::Name &name, PcoPtr data)
{
if (m_forwardingHint == Name ())
- m_onDataSegment (*this, seqno, m_name, name, content);
+ m_onDataSegment (*this, seqno, m_name, name, data);
else
{
try {
- ParsedContentObject pco (content);
- m_onDataSegment (*this, seqno, m_name, pco.name (), pco.content ());
+ PcoPtr pco = make_shared<ParsedContentObject> (*data->contentPtr ());
+ m_onDataSegment (*this, seqno, m_name, pco->name (), pco);
}
catch (MisformedContentObjectException &e)
{