summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/FileTransfer/IncomingJingleFileTransfer.cpp')
-rw-r--r--Swiften/FileTransfer/IncomingJingleFileTransfer.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp b/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
index d5de5e4..7c46c60 100644
--- a/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
+++ b/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
@@ -1,3 +1,3 @@
/*
- * Copyright (c) 2011-2016 Isode Limited.
+ * Copyright (c) 2011-2019 Isode Limited.
* All rights reserved.
@@ -69,4 +69,4 @@ void IncomingJingleFileTransfer::accept(
const FileTransferOptions& options) {
- SWIFT_LOG(debug) << std::endl;
- if (state != Initial) { SWIFT_LOG(warning) << "Incorrect state" << std::endl; return; }
+ SWIFT_LOG(debug);
+ if (state != Initial) { SWIFT_LOG(warning) << "Incorrect state"; return; }
@@ -87,3 +87,3 @@ void IncomingJingleFileTransfer::accept(
if (s5bTransport) {
- SWIFT_LOG(debug) << "Got S5B transport as initial payload." << std::endl;
+ SWIFT_LOG(debug) << "Got S5B transport as initial payload.";
setTransporter(transporterFactory->createResponderTransporter(
@@ -95,3 +95,3 @@ void IncomingJingleFileTransfer::accept(
else if (ibbTransport && options.isInBandAllowed()) {
- SWIFT_LOG(debug) << "Got IBB transport as initial payload." << std::endl;
+ SWIFT_LOG(debug) << "Got IBB transport as initial payload.";
setTransporter(transporterFactory->createResponderTransporter(
@@ -114,3 +114,3 @@ void IncomingJingleFileTransfer::accept(
void IncomingJingleFileTransfer::cancel() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
terminate(state == Initial ? JinglePayload::Reason::Decline : JinglePayload::Reason::Cancel);
@@ -122,4 +122,4 @@ void IncomingJingleFileTransfer::handleLocalTransportCandidatesGenerated(
const std::string& dstAddr) {
- SWIFT_LOG(debug) << std::endl;
- if (state != GeneratingInitialLocalCandidates) { SWIFT_LOG(warning) << "Incorrect state" << std::endl; return; }
+ SWIFT_LOG(debug);
+ if (state != GeneratingInitialLocalCandidates) { SWIFT_LOG(warning) << "Incorrect state"; return; }
@@ -142,3 +142,3 @@ void IncomingJingleFileTransfer::handleLocalTransportCandidatesGenerated(
void IncomingJingleFileTransfer::handleSessionInfoReceived(JinglePayload::ref jinglePayload) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -146,3 +146,3 @@ void IncomingJingleFileTransfer::handleSessionInfoReceived(JinglePayload::ref ji
if (transferHash) {
- SWIFT_LOG(debug) << "Received hash information." << std::endl;
+ SWIFT_LOG(debug) << "Received hash information.";
waitOnHashTimer->stop();
@@ -159,3 +159,3 @@ void IncomingJingleFileTransfer::handleSessionInfoReceived(JinglePayload::ref ji
else {
- SWIFT_LOG(debug) << "Ignoring unknown session info" << std::endl;
+ SWIFT_LOG(debug) << "Ignoring unknown session info";
}
@@ -164,7 +164,7 @@ void IncomingJingleFileTransfer::handleSessionInfoReceived(JinglePayload::ref ji
void IncomingJingleFileTransfer::handleSessionTerminateReceived(boost::optional<JinglePayload::Reason> reason) {
- SWIFT_LOG(debug) << std::endl;
- if (state == Finished) { SWIFT_LOG(warning) << "Incorrect state" << std::endl; return; }
+ SWIFT_LOG(debug);
+ if (state == Finished) { SWIFT_LOG(warning) << "Incorrect state"; return; }
if (state == Finished) {
- SWIFT_LOG(debug) << "Already terminated" << std::endl;
+ SWIFT_LOG(debug) << "Already terminated";
return;
@@ -189,3 +189,3 @@ void IncomingJingleFileTransfer::checkHashAndTerminate() {
else {
- SWIFT_LOG(warning) << "Hash verification failed" << std::endl;
+ SWIFT_LOG(warning) << "Hash verification failed";
terminate(JinglePayload::Reason::MediaError);
@@ -196,3 +196,3 @@ void IncomingJingleFileTransfer::checkIfAllDataReceived() {
if (receivedBytes == getFileSizeInBytes()) {
- SWIFT_LOG(debug) << "All data received." << std::endl;
+ SWIFT_LOG(debug) << "All data received.";
bool hashInfoAvailable = false;
@@ -203,3 +203,3 @@ void IncomingJingleFileTransfer::checkIfAllDataReceived() {
if (!hashInfoAvailable) {
- SWIFT_LOG(debug) << "No hash information yet. Waiting a while on hash info." << std::endl;
+ SWIFT_LOG(debug) << "No hash information yet. Waiting a while on hash info.";
setState(WaitingForHash);
@@ -212,3 +212,3 @@ void IncomingJingleFileTransfer::checkIfAllDataReceived() {
else if (receivedBytes > getFileSizeInBytes()) {
- SWIFT_LOG(debug) << "We got more than we could handle!" << std::endl;
+ SWIFT_LOG(debug) << "We got more than we could handle!";
terminate(JinglePayload::Reason::MediaError);
@@ -227,5 +227,5 @@ void IncomingJingleFileTransfer::handleTransportReplaceReceived(
const JingleContentID& content, JingleTransportPayload::ref transport) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
if (state != WaitingForFallbackOrTerminate) {
- SWIFT_LOG(warning) << "Incorrect state" << std::endl;
+ SWIFT_LOG(warning) << "Incorrect state";
return;
@@ -235,3 +235,3 @@ void IncomingJingleFileTransfer::handleTransportReplaceReceived(
if (options.isInBandAllowed() && (ibbTransport = std::dynamic_pointer_cast<JingleIBBTransportPayload>(transport))) {
- SWIFT_LOG(debug) << "transport replaced with IBB" << std::endl;
+ SWIFT_LOG(debug) << "transport replaced with IBB";
@@ -244,3 +244,3 @@ void IncomingJingleFileTransfer::handleTransportReplaceReceived(
else {
- SWIFT_LOG(debug) << "Unknown replace transport" << std::endl;
+ SWIFT_LOG(debug) << "Unknown replace transport";
session->sendTransportReject(content, transport);
@@ -255,3 +255,3 @@ bool IncomingJingleFileTransfer::verifyData() {
if (hashes.empty()) {
- SWIFT_LOG(debug) << "no verification possible, skipping" << std::endl;
+ SWIFT_LOG(debug) << "no verification possible, skipping";
return true;
@@ -259,3 +259,3 @@ bool IncomingJingleFileTransfer::verifyData() {
if (hashes.find("sha-1") != hashes.end()) {
- SWIFT_LOG(debug) << "Verify SHA-1 hash: " << (hashes["sha-1"] == hashCalculator->getSHA1Hash()) << std::endl;
+ SWIFT_LOG(debug) << "Verify SHA-1 hash: " << (hashes["sha-1"] == hashCalculator->getSHA1Hash());
return hashes["sha-1"] == hashCalculator->getSHA1Hash();
@@ -263,3 +263,3 @@ bool IncomingJingleFileTransfer::verifyData() {
else if (hashes.find("md5") != hashes.end()) {
- SWIFT_LOG(debug) << "Verify MD5 hash: " << (hashes["md5"] == hashCalculator->getMD5Hash()) << std::endl;
+ SWIFT_LOG(debug) << "Verify MD5 hash: " << (hashes["md5"] == hashCalculator->getMD5Hash());
return hashes["md5"] == hashCalculator->getMD5Hash();
@@ -267,3 +267,3 @@ bool IncomingJingleFileTransfer::verifyData() {
else {
- SWIFT_LOG(debug) << "Unknown hash, skipping" << std::endl;
+ SWIFT_LOG(debug) << "Unknown hash, skipping";
return true;
@@ -273,3 +273,3 @@ bool IncomingJingleFileTransfer::verifyData() {
void IncomingJingleFileTransfer::handleWaitOnHashTimerTicked() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
waitOnHashTimer->stop();
@@ -287,3 +287,3 @@ const JID& IncomingJingleFileTransfer::getRecipient() const {
void IncomingJingleFileTransfer::setState(State state) {
- SWIFT_LOG(debug) << state << std::endl;
+ SWIFT_LOG(debug) << state;
this->state = state;
@@ -294,3 +294,3 @@ void IncomingJingleFileTransfer::setFinishedState(
FileTransfer::State::Type type, const boost::optional<FileTransferError>& error) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
this->state = Finished;
@@ -342,3 +342,3 @@ void IncomingJingleFileTransfer::stopAll() {
break;
- case Finished: SWIFT_LOG(warning) << "Already finished" << std::endl; break;
+ case Finished: SWIFT_LOG(warning) << "Already finished"; break;
}
@@ -358,3 +358,3 @@ void IncomingJingleFileTransfer::fallback() {
void IncomingJingleFileTransfer::startTransferViaRemoteCandidate() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -369,3 +369,3 @@ void IncomingJingleFileTransfer::startTransferViaRemoteCandidate() {
void IncomingJingleFileTransfer::startTransferViaLocalCandidate() {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -381,3 +381,3 @@ void IncomingJingleFileTransfer::startTransferViaLocalCandidate() {
void IncomingJingleFileTransfer::startTransferring(std::shared_ptr<TransportSession> transportSession) {
- SWIFT_LOG(debug) << std::endl;
+ SWIFT_LOG(debug);
@@ -411,3 +411,3 @@ std::shared_ptr<TransportSession> IncomingJingleFileTransfer::createRemoteCandid
void IncomingJingleFileTransfer::terminate(JinglePayload::Reason::Type reason) {
- SWIFT_LOG(debug) << reason << std::endl;
+ SWIFT_LOG(debug) << reason;