diff options
Diffstat (limited to 'Swiften/FileTransfer/IBBReceiveSession.cpp')
-rw-r--r-- | Swiften/FileTransfer/IBBReceiveSession.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Swiften/FileTransfer/IBBReceiveSession.cpp b/Swiften/FileTransfer/IBBReceiveSession.cpp index 43c26be..1a2bb3a 100644 --- a/Swiften/FileTransfer/IBBReceiveSession.cpp +++ b/Swiften/FileTransfer/IBBReceiveSession.cpp @@ -63,22 +63,24 @@ class IBBReceiveSession::IBBResponder : public SetResponder<IBB> { IBBReceiveSession* session; int sequenceNumber; size_t receivedSize; }; IBBReceiveSession::IBBReceiveSession( const std::string& id, const JID& from, + const JID& to, size_t size, IQRouter* router) : id(id), from(from), + to(to), size(size), router(router), active(false) { assert(!id.empty()); assert(from.isValid()); responder = new IBBResponder(this, router); } IBBReceiveSession::~IBBReceiveSession() { @@ -93,19 +95,19 @@ void IBBReceiveSession::start() { active = true; responder->start(); } void IBBReceiveSession::stop() { SWIFT_LOG(debug) << "receive session stopped" << std::endl; responder->stop(); if (active) { if (router->isAvailable()) { - IBBRequest::create(from, IBB::createIBBClose(id), router)->send(); + IBBRequest::create(to, from, IBB::createIBBClose(id), router)->send(); } finish(boost::optional<FileTransferError>()); } } void IBBReceiveSession::finish(boost::optional<FileTransferError> error) { active = false; onFinished(error); } |