Project

General

Profile

Task #4876

ShouldAddToSyncDataCallback should take the entire Name, not the prefix

Added by Jeff Thompson over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/12/2019
Due date:
% Done:

0%

Estimated time:

Description

When FullProducerArbitrary calls m_onShouldAddToSyncDataCallback, it passes the prefix without the sequence number.
https://github.com/8th-ndn-hackathon/PSync/blob/0fb388245a429e651ea15ac1f62696d4e5cfdbcb/PSync/full-producer-arbitrary.cpp#L198

m_onShouldAddToSyncDataCallback(prefix.toUri(), negative)

But the FullProducerArbitrary is supposed to work with entire names, not prefix/seq . So, this should call

m_onShouldAddToSyncDataCallback(name, negative)

And the ShouldAddToSyncDataCallback callback
https://github.com/8th-ndn-hackathon/PSync/blob/0fb388245a429e651ea15ac1f62696d4e5cfdbcb/PSync/full-producer.cpp#L46
should be changed to get the prefix:

[this] (const ndn::Name& name, const std::set<uint32_t>& negative) {
  return isNotFutureHash(name.getPrefix(-1), negative);
},

No data to display

Also available in: Atom PDF