face: allow the creation of permanent TCP faces

Change-Id: I516c176b000a78012f2ef7bd7f1f3e74c1758a94
Refs: #3167
diff --git a/daemon/face/tcp-factory.cpp b/daemon/face/tcp-factory.cpp
index 5e8f3fb..49f1307 100644
--- a/daemon/face/tcp-factory.cpp
+++ b/daemon/face/tcp-factory.cpp
@@ -135,9 +135,9 @@
     return;
   }
 
-  if (persistency != ndn::nfd::FACE_PERSISTENCY_PERSISTENT) {
-    NFD_LOG_TRACE("createFace only supports FACE_PERSISTENCY_PERSISTENT");
-    onFailure(406, "Outgoing TCP faces only support persistent persistency");
+  if (persistency == ndn::nfd::FACE_PERSISTENCY_ON_DEMAND) {
+    NFD_LOG_TRACE("createFace does not support FACE_PERSISTENCY_ON_DEMAND");
+    onFailure(406, "Outgoing TCP faces do not support on-demand persistency");
     return;
   }
 
@@ -145,9 +145,9 @@
                          boost::lexical_cast<uint16_t>(remoteUri.getPort()));
 
   if (endpoint.address().is_multicast()) {
-   NFD_LOG_TRACE("createFace cannot create multicast faces");
-   onFailure(406, "Cannot create multicast TCP faces");
-   return;
+    NFD_LOG_TRACE("createFace does not support multicast faces");
+    onFailure(406, "Cannot create multicast TCP faces");
+    return;
   }
 
   if (m_prohibitedEndpoints.find(endpoint) != m_prohibitedEndpoints.end()) {
@@ -167,7 +167,7 @@
   for (const auto& i : m_channels) {
     if ((i.first.address().is_v4() && endpoint.address().is_v4()) ||
         (i.first.address().is_v6() && endpoint.address().is_v6())) {
-      i.second->connect(endpoint, wantLocalFieldsEnabled, onCreated, onFailure);
+      i.second->connect(endpoint, persistency, wantLocalFieldsEnabled, onCreated, onFailure);
       return;
     }
   }