diff options
Diffstat (limited to 'Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp')
| -rw-r--r-- | Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp b/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp index 5c18b13..f9441cd 100644 --- a/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp +++ b/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp | |||
| @@ -134,13 +134,16 @@ void OutgoingJingleFileTransfer::handleSessionTerminateReceived(boost::optional< | |||
| 134 | waitForRemoteTermination->stop(); | 134 | waitForRemoteTermination->stop(); |
| 135 | } | 135 | } |
| 136 | if (reason && reason->type == JinglePayload::Reason::Cancel) { | 136 | if (reason && reason->type == JinglePayload::Reason::Cancel) { |
| 137 | setFinishedState(FileTransfer::State::Canceled, FileTransferError(FileTransferError::PeerError)); | 137 | setFinishedState(FileTransfer::State::Canceled, FileTransferError(FileTransferError::PeerError)); |
| 138 | } | 138 | } |
| 139 | else if (reason && reason->type == JinglePayload::Reason::Decline) { | ||
| 140 | setFinishedState(FileTransfer::State::Canceled, boost::optional<FileTransferError>()); | ||
| 141 | } | ||
| 139 | else if (reason && reason->type == JinglePayload::Reason::Success) { | 142 | else if (reason && reason->type == JinglePayload::Reason::Success) { |
| 140 | setFinishedState(FileTransfer::State::Finished, boost::optional<FileTransferError>()); | 143 | setFinishedState(FileTransfer::State::Finished, boost::optional<FileTransferError>()); |
| 141 | } | 144 | } |
| 142 | else { | 145 | else { |
| 143 | setFinishedState(FileTransfer::State::Failed, FileTransferError(FileTransferError::PeerError)); | 146 | setFinishedState(FileTransfer::State::Failed, FileTransferError(FileTransferError::PeerError)); |
| 144 | } | 147 | } |
| 145 | } | 148 | } |
| 146 | 149 | ||
| @@ -188,10 +191,11 @@ void OutgoingJingleFileTransfer::handleLocalTransportCandidatesGenerated( | |||
| 188 | transport->setSessionID(s5bSessionID); | 191 | transport->setSessionID(s5bSessionID); |
| 189 | transport->setMode(JingleS5BTransportPayload::TCPMode); | 192 | transport->setMode(JingleS5BTransportPayload::TCPMode); |
| 190 | transport->setDstAddr(dstAddr); | 193 | transport->setDstAddr(dstAddr); |
| 191 | foreach(JingleS5BTransportPayload::Candidate candidate, candidates) { | 194 | foreach(JingleS5BTransportPayload::Candidate candidate, candidates) { |
| 192 | transport->addCandidate(candidate); | 195 | transport->addCandidate(candidate); |
| 196 | SWIFT_LOG(debug) << "\t" << "S5B candidate: " << candidate.hostPort.toString() << std::endl; | ||
| 193 | } | 197 | } |
| 194 | setState(WaitingForAccept); | 198 | setState(WaitingForAccept); |
| 195 | session->sendInitiate(contentID, description, transport); | 199 | session->sendInitiate(contentID, description, transport); |
| 196 | } | 200 | } |
| 197 | 201 | ||
Swift