face: Prevent infinite loop in TcpFactory and UdpFactory

Change-Id: Idd694bc08033c524f3c0e569ed74341aa33fce31
Refs: #2292
diff --git a/daemon/face/tcp-factory.hpp b/daemon/face/tcp-factory.hpp
index fd57fe5..e2ebda5 100644
--- a/daemon/face/tcp-factory.hpp
+++ b/daemon/face/tcp-factory.hpp
@@ -88,7 +88,7 @@
   virtual std::list<shared_ptr<const Channel> >
   getChannels() const;
 
-private:
+PUBLIC_WITH_TESTS_ELSE_PRIVATE:
 
   void
   prohibitEndpoint(const tcp::Endpoint& endpoint);
@@ -115,7 +115,7 @@
                                  const FaceCreatedCallback& onCreated,
                                  const FaceConnectFailedCallback& onConnectFailed);
 
-private:
+PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   typedef std::map< tcp::Endpoint, shared_ptr<TcpChannel> > ChannelMap;
   ChannelMap m_channels;