summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-01-09 16:39:11 (GMT)
committerSwift Review <review@swift.im>2015-02-11 09:35:21 (GMT)
commit779f0d57bc9d90300aad0b1386dc937612ac35f4 (patch)
tree2b7beb4db6af92eef45a6adaf0118d3ba149056b /Swiften/FileTransfer/UnitTest
parent66567c962202920b0d6bc06029ed37565cd4a81c (diff)
downloadswift-779f0d57bc9d90300aad0b1386dc937612ac35f4.zip
swift-779f0d57bc9d90300aad0b1386dc937612ac35f4.tar.bz2
Support domain names in S5B proxy <streamhost> tags.
S5BProxyManager now resolves DNS names of proxy entries discovered via service discovery. Test-Information: Tested against a XMPP installation that uses domain names in proxy entires. Change-Id: I728243333ec6e62e86f088f2a7b6e222c629757b
Diffstat (limited to 'Swiften/FileTransfer/UnitTest')
-rw-r--r--Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp b/Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp
index 207f590..aaf90ea 100644
--- a/Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp
+++ b/Swiften/FileTransfer/UnitTest/IncomingJingleFileTransferTest.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2013-2014 Isode Limited.
+ * Copyright (c) 2013-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -28,6 +28,7 @@
#include <Swiften/FileTransfer/IncomingJingleFileTransfer.h>
#include <Swiften/FileTransfer/SOCKS5BytestreamRegistry.h>
#include <Swiften/Network/PlatformNetworkEnvironment.h>
+#include <Swiften/Network/StaticDomainNameResolver.h>
#include <Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h>
#include <Swiften/FileTransfer/SOCKS5BytestreamServerManager.h>
#include <Swiften/Jingle/FakeJingleSession.h>
@@ -67,6 +68,7 @@ public:
void setUp() {
crypto = boost::shared_ptr<CryptoProvider>(PlatformCryptoProvider::create());
eventLoop = new DummyEventLoop();
+ resolver = new StaticDomainNameResolver(eventLoop);
session = boost::make_shared<FakeJingleSession>("foo@bar.com/baz", "mysession");
jingleContentPayload = make_shared<JingleContentPayload>();
// fakeRJTCSF = make_shared<FakeRemoteJingleTransportCandidateSelectorFactory>();
@@ -81,7 +83,7 @@ public:
bytestreamServerManager = new SOCKS5BytestreamServerManager(bytestreamRegistry, serverConnectionFactory, networkEnvironment, natTraverser);
idGenerator = new SimpleIDGenerator();
timerFactory = new DummyTimerFactory();
- bytestreamProxy = new SOCKS5BytestreamProxiesManager(connectionFactory, timerFactory);
+ bytestreamProxy = new SOCKS5BytestreamProxiesManager(connectionFactory, timerFactory, resolver, iqRouter, "bar.com");
ftTransporterFactory = new DefaultFileTransferTransporterFactory(bytestreamRegistry, bytestreamServerManager, bytestreamProxy, idGenerator, connectionFactory, timerFactory, crypto.get(), iqRouter);
}
@@ -94,6 +96,7 @@ public:
delete bytestreamRegistry;
delete iqRouter;
delete stanzaChannel;
+ delete resolver;
delete eventLoop;
Log::setLogLevel(Log::error);
}
@@ -232,6 +235,7 @@ private:
NetworkEnvironment* networkEnvironment;
NATTraverser* natTraverser;
IDGenerator* idGenerator;
+ DomainNameResolver* resolver;
};
CPPUNIT_TEST_SUITE_REGISTRATION(IncomingJingleFileTransferTest);