summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/ScreenSharing/ScreenSharing.cpp')
-rw-r--r--Swiften/ScreenSharing/ScreenSharing.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/ScreenSharing/ScreenSharing.cpp b/Swiften/ScreenSharing/ScreenSharing.cpp
index d5ab921..eede971 100644
--- a/Swiften/ScreenSharing/ScreenSharing.cpp
+++ b/Swiften/ScreenSharing/ScreenSharing.cpp
@@ -33,6 +33,8 @@ void ScreenSharing::stop()
jingleSession->sendTerminate(JinglePayload::Reason::Success);
if (rtpSession)
rtpSession->stop();
+ onStateChange(ScreenSharing::Finished);
+ onFinished();
}
bool ScreenSharing::addBestCandidate(boost::shared_ptr<JingleRawUDPTransportPayload> transport)
@@ -83,14 +85,12 @@ void ScreenSharing::handleSessionTerminateReceived(boost::optional<JinglePayload
if (reason.is_initialized() && reason.get().type == JinglePayload::Reason::Cancel) {
onStateChange(ScreenSharing::Canceled);
- //onFinished(FileTransferError(FileTransferError::PeerError));
} else if (reason.is_initialized() && reason.get().type == JinglePayload::Reason::Success) {
onStateChange(ScreenSharing::Finished);
- //onFinished(boost::optional<FileTransferError>());
} else {
onStateChange(ScreenSharing::Failed);
- //onFinished(FileTransferError(FileTransferError::PeerError));
}
+ onFinished();
}
}