summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/FileTransfer/DefaultFileTransferTransporter.cpp')
-rw-r--r--Swiften/FileTransfer/DefaultFileTransferTransporter.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp b/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp
index 9428d0b..aefafd9 100644
--- a/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp
+++ b/Swiften/FileTransfer/DefaultFileTransferTransporter.cpp
@@ -204,8 +204,12 @@ std::shared_ptr<TransportSession> DefaultFileTransferTransporter::createLocalCan
std::shared_ptr<TransportSession> transportSession;
if (candidate.type == JingleS5BTransportPayload::Candidate::ProxyType) {
SOCKS5BytestreamClientSession::ref proxySession = s5bProxy->getProxySessionAndCloseOthers(candidate.jid, getLocalCandidateSOCKS5DstAddr());
- assert(proxySession);
- transportSession = std::make_shared<S5BTransportSession<SOCKS5BytestreamClientSession> >(proxySession, stream);
+ if (proxySession) {
+ transportSession = std::make_shared<S5BTransportSession<SOCKS5BytestreamClientSession> >(proxySession, stream);
+ }
+ else {
+ SWIFT_LOG(error) << "Failed obtaining proxy session with candidate JID " << candidate.jid << " and dstAddr " << getLocalCandidateSOCKS5DstAddr() << "." << std::endl;
+ }
}
if (!transportSession) {
@@ -227,8 +231,12 @@ std::shared_ptr<TransportSession> DefaultFileTransferTransporter::createLocalCan
std::shared_ptr<TransportSession> transportSession;
if (candidate.type == JingleS5BTransportPayload::Candidate::ProxyType) {
SOCKS5BytestreamClientSession::ref proxySession = s5bProxy->getProxySessionAndCloseOthers(candidate.jid, getLocalCandidateSOCKS5DstAddr());
- assert(proxySession);
- transportSession = std::make_shared<S5BTransportSession<SOCKS5BytestreamClientSession> >(proxySession, stream);
+ if (proxySession) {
+ transportSession = std::make_shared<S5BTransportSession<SOCKS5BytestreamClientSession> >(proxySession, stream);
+ }
+ else {
+ SWIFT_LOG(error) << "Failed obtaining proxy session with candidate JID " << candidate.jid << " and dstAddr " << getLocalCandidateSOCKS5DstAddr() << "." << std::endl;
+ }
}
if (!transportSession) {