security: don't crash if received segment lacks KeyLocator
And while at it:
* move afterSegmentValidated() to a lambda
* remove unused loopback parameter from setInterestFilter()
* delete unused clear() method
* improve logging
* prevent building without PSync if tests are enabled, since that
configuration is currently unsupported
Change-Id: I930744296d3fa295787c16e6829d1dc27b06a195
diff --git a/tests/communication/test-sync-logic-handler.cpp b/tests/communication/test-sync-logic-handler.cpp
index c4a630b..9a0c7e3 100644
--- a/tests/communication/test-sync-logic-handler.cpp
+++ b/tests/communication/test-sync-logic-handler.cpp
@@ -39,7 +39,7 @@
getSync()
{
if (m_sync == nullptr) {
- m_sync.reset(new SyncLogicHandler(face, m_keyChain, testIsLsaNew, opts));
+ m_sync = std::make_unique<SyncLogicHandler>(face, m_keyChain, testIsLsaNew, opts);
}
return *m_sync;
}
@@ -50,9 +50,11 @@
this->advanceClocks(1_ms, 10);
face.sentInterests.clear();
+#ifdef HAVE_PSYNC
std::vector<psync::MissingDataInfo> updates;
updates.push_back({prefix, 0, seqNo, 0});
getSync().m_syncLogic.onPSyncUpdate(updates);
+#endif
this->advanceClocks(1_ms, 10);
}