src: Making shared_ptr<ndn::Data> to put to NFD
Change-Id: I2c8b0a322cbe2a848ba2be7d9e9639237a08878a
diff --git a/nsync/sync-logic.cc b/nsync/sync-logic.cc
index af864d3..2a748c3 100644
--- a/nsync/sync-logic.cc
+++ b/nsync/sync-logic.cc
@@ -665,13 +665,15 @@
char *wireData = new char[size];
ssm.SerializeToArray(wireData, size);
- Data syncData(name);
- syncData.setContent(reinterpret_cast<const uint8_t*>(wireData), size);
- syncData.setFreshnessPeriod(ndn::time::seconds(m_syncResponseFreshness));
+ //Data syncData(name);
+ ndn::shared_ptr<ndn::Data> syncData = ndn::make_shared<ndn::Data>();
+ syncData->setName(name);
+ syncData->setContent(reinterpret_cast<const uint8_t*>(wireData), size);
+ syncData->setFreshnessPeriod(ndn::time::seconds(m_syncResponseFreshness));
- m_keyChain->sign(syncData);
+ m_keyChain->sign(*syncData);
- m_face->put(syncData);
+ m_face->put(*syncData);
delete []wireData;