face: Fixing bug with InternalFace considered not local and changing "isLocal" method to be pure virtual
This way the decision about the face locality has to be done explicitly
inside specific face implementation and potentially avoids problems.
Change-Id: I5219cce87385313546453d14a5a7ca4542893911
diff --git a/tests/face/dummy-face.hpp b/tests/face/dummy-face.hpp
index e78f4cc..7de128d 100644
--- a/tests/face/dummy-face.hpp
+++ b/tests/face/dummy-face.hpp
@@ -18,7 +18,9 @@
class DummyFace : public Face
{
public:
- DummyFace()
+ explicit
+ DummyFace(bool isLocal = false)
+ : m_isLocal(isLocal)
{
}
@@ -36,6 +38,15 @@
close()
{
}
+
+ virtual bool
+ isLocal() const
+ {
+ return m_isLocal;
+ }
+
+private:
+ bool m_isLocal;
};
} // namespace nfd
diff --git a/tests/fw/forwarder.cpp b/tests/fw/forwarder.cpp
index 433c36b..ed8f6a7 100644
--- a/tests/fw/forwarder.cpp
+++ b/tests/fw/forwarder.cpp
@@ -38,6 +38,12 @@
{
}
+ virtual bool
+ isLocal() const
+ {
+ return false;
+ }
+
void
receiveInterest(const Interest& interest)
{