summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-06-29 15:06:30 (GMT)
committerTobias Markmann <tm@ayena.de>2016-06-29 15:11:43 (GMT)
commit82dd5a11131b3bd3641316b87aa279d806c970b0 (patch)
tree659ac3d0e1520a1fbe1265500e0b73c8597a00a8 /Swiften/FileTransfer/FailingTransportSession.cpp
parent09c22ea2ff3ff40b9b298475d47809b4bd373216 (diff)
downloadswift-82dd5a11131b3bd3641316b87aa279d806c970b0.zip
swift-82dd5a11131b3bd3641316b87aa279d806c970b0.tar.bz2
Fail file-transfer if proxy session of candidate does not exist
Test-Information: Tested with a buggy XMPP client that calculates S5B DSTADDR in a non-standard way. Previously this lead to Swift crashing on an assert. Now Swift just indicates file-transfer failure to the other party. Change-Id: I4ed47f9647a1851f2a5101657bcd569c106d638f
Diffstat (limited to 'Swiften/FileTransfer/FailingTransportSession.cpp')
-rw-r--r--Swiften/FileTransfer/FailingTransportSession.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/Swiften/FileTransfer/FailingTransportSession.cpp b/Swiften/FileTransfer/FailingTransportSession.cpp
new file mode 100644
index 0000000..d1eb6a6
--- /dev/null
+++ b/Swiften/FileTransfer/FailingTransportSession.cpp
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
+#include <Swiften/FileTransfer/FailingTransportSession.h>
+
+#include <Swiften/Base/Log.h>
+
+namespace Swift {
+
+FailingTransportSession::~FailingTransportSession() {
+}
+
+void FailingTransportSession::start() {
+ SWIFT_LOG(error) << "Trying to start failing transport." << std::endl;
+ onFinished(FileTransferError(FileTransferError::PeerError));
+}
+
+void FailingTransportSession::stop() {
+}
+
+}