summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-03-08 19:30:00 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-03-28 10:52:50 (GMT)
commit7f84bd25373ef37c25460d573ef21398ee649eed (patch)
treedf8ed0a624421717247e507fe30148e63794150d /Swiften
parent81f06ccf527dbbd3b9082d7c1a35e4e312a168e0 (diff)
downloadswift-7f84bd25373ef37c25460d573ef21398ee649eed.zip
swift-7f84bd25373ef37c25460d573ef21398ee649eed.tar.bz2
Set file-transfer finished state after checking the data
Test-Information: The FileTransfer::onFinished was not called when the file transfer finished. Verified with log output that it is called correctly now. Change-Id: I05f2a749ca3f0aece08cae9503a212cf0327f98a
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/FileTransfer/IncomingJingleFileTransfer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp b/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
index a0cd47c..7c91c6a 100644
--- a/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
+++ b/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
@@ -176,10 +176,12 @@ void IncomingJingleFileTransfer::handleSessionTerminateReceived(boost::optional<
void IncomingJingleFileTransfer::checkHashAndTerminate() {
if (verifyData()) {
terminate(JinglePayload::Reason::Success);
+ setFinishedState(FileTransfer::State::Finished, FileTransferError());
}
else {
SWIFT_LOG(warning) << "Hash verification failed" << std::endl;
terminate(JinglePayload::Reason::MediaError);
+ setFinishedState(FileTransfer::State::Failed, FileTransferError());
}
}