diff options
Diffstat (limited to 'Swiften/Network/BoostNetworkFactories.cpp')
-rw-r--r-- | Swiften/Network/BoostNetworkFactories.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Swiften/Network/BoostNetworkFactories.cpp b/Swiften/Network/BoostNetworkFactories.cpp index c13270f..315290c 100644 --- a/Swiften/Network/BoostNetworkFactories.cpp +++ b/Swiften/Network/BoostNetworkFactories.cpp @@ -10,6 +10,7 @@ #include <Swiften/Network/PlatformDomainNameResolver.h> #include <Swiften/Network/BoostConnectionServerFactory.h> #include <Swiften/Network/PlatformNATTraversalWorker.h> +#include <Swiften/Network/NullNATTraverser.h> namespace Swift { @@ -18,11 +19,15 @@ BoostNetworkFactories::BoostNetworkFactories(EventLoop* eventLoop) { connectionFactory = new BoostConnectionFactory(ioServiceThread.getIOService(), eventLoop); domainNameResolver = new PlatformDomainNameResolver(eventLoop); connectionServerFactory = new BoostConnectionServerFactory(ioServiceThread.getIOService(), eventLoop); - platformNATTraversalWorker = new PlatformNATTraversalWorker(eventLoop); +#ifdef SWIFT_EXPERIMENTAL_FT + natTraverser = new PlatformNATTraversalWorker(eventLoop); +#else + natTraverser = new NullNATTraverser(eventLoop); +#endif } BoostNetworkFactories::~BoostNetworkFactories() { - delete platformNATTraversalWorker; + delete natTraverser; delete connectionServerFactory; delete domainNameResolver; delete connectionFactory; |