face: ProtocolFactory::createFace with FacePersistency
Change-Id: If02510bd631e9aaa63b3cca89ced31a42e192ded
Refs: #2989
diff --git a/daemon/face/tcp-factory.cpp b/daemon/face/tcp-factory.cpp
index dc7e369..9c640a1 100644
--- a/daemon/face/tcp-factory.cpp
+++ b/daemon/face/tcp-factory.cpp
@@ -127,9 +127,14 @@
void
TcpFactory::createFace(const FaceUri& uri,
+ ndn::nfd::FacePersistency persistency,
const FaceCreatedCallback& onCreated,
const FaceConnectFailedCallback& onConnectFailed)
{
+ if (persistency != ndn::nfd::FACE_PERSISTENCY_PERSISTENT) {
+ throw Error("TcpFactory only supports persistent face");
+ }
+
BOOST_ASSERT(uri.isCanonical());
boost::asio::ip::address ipAddress = boost::asio::ip::address::from_string(uri.getHost());
tcp::Endpoint endpoint(ipAddress, boost::lexical_cast<uint16_t>(uri.getPort()));