Revert "pit: add EndpointId field in in-record and out-record"
This reverts commit d3ae85dbad518da84d0ef5ba61b81108e40f84f3.
refs: #4973
Change-Id: I0aedfca8ae75137c8c9073a51642bfacf9d8f212
diff --git a/daemon/fw/strategy.cpp b/daemon/fw/strategy.cpp
index 151dac8..b4ccda8 100644
--- a/daemon/fw/strategy.cpp
+++ b/daemon/fw/strategy.cpp
@@ -199,7 +199,7 @@
// delete the PIT entry's in-record based on egress,
// since Data is sent to face and endpoint from which the Interest was received
- pitEntry->deleteInRecord(egress.face, egress.endpoint);
+ pitEntry->deleteInRecord(egress.face);
m_forwarder.onOutgoingData(data, egress);
}
@@ -208,23 +208,22 @@
Strategy::sendDataToAll(const shared_ptr<pit::Entry>& pitEntry,
const FaceEndpoint& ingress, const Data& data)
{
- std::set<std::pair<Face*, EndpointId>> pendingDownstreams;
+ std::set<Face*> pendingDownstreams;
auto now = time::steady_clock::now();
// remember pending downstreams
for (const pit::InRecord& inRecord : pitEntry->getInRecords()) {
if (inRecord.getExpiry() > now) {
if (inRecord.getFace().getId() == ingress.face.getId() &&
- inRecord.getEndpointId() == ingress.endpoint &&
inRecord.getFace().getLinkType() != ndn::nfd::LINK_TYPE_AD_HOC) {
continue;
}
- pendingDownstreams.emplace(&inRecord.getFace(), inRecord.getEndpointId());
+ pendingDownstreams.emplace(&inRecord.getFace());
}
}
for (const auto& pendingDownstream : pendingDownstreams) {
- this->sendData(pitEntry, data, FaceEndpoint(*pendingDownstream.first, pendingDownstream.second));
+ this->sendData(pitEntry, data, FaceEndpoint(*pendingDownstream, 0));
}
}
@@ -233,20 +232,20 @@
std::initializer_list<FaceEndpoint> exceptFaceEndpoints)
{
// populate downstreams with all downstreams faces
- std::set<std::pair<Face*, EndpointId>> downstreams;
+ std::set<Face*> downstreams;
std::transform(pitEntry->in_begin(), pitEntry->in_end(), std::inserter(downstreams, downstreams.end()),
[] (const pit::InRecord& inR) {
- return std::make_pair(&inR.getFace(), inR.getEndpointId());
+ return &inR.getFace();
});
// delete excluded faces
for (const auto& exceptFaceEndpoint : exceptFaceEndpoints) {
- downstreams.erase({&exceptFaceEndpoint.face, exceptFaceEndpoint.endpoint});
+ downstreams.erase(&exceptFaceEndpoint.face);
}
// send Nacks
for (const auto& downstream : downstreams) {
- this->sendNack(pitEntry, FaceEndpoint(*downstream.first, downstream.second), header);
+ this->sendNack(pitEntry, FaceEndpoint(*downstream, 0), header);
}
// warning: don't loop on pitEntry->getInRecords(), because in-record is deleted when sending Nack
}