diff options
author | Tobias Markmann <tm@ayena.de> | 2011-05-26 18:46:49 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-09-25 17:42:32 (GMT) |
commit | 4f62e5ec4b42929fe3c1a68667e63cb1b7a35509 (patch) | |
tree | 0d19fac3f578dec00ccf3e58930312951e38de89 /Swiften/FileTransfer/OutgoingSIFileTransfer.cpp | |
parent | de660b763459cdd707876ec244b6866abca07fa2 (diff) | |
download | swift-contrib-4f62e5ec4b42929fe3c1a68667e63cb1b7a35509.zip swift-contrib-4f62e5ec4b42929fe3c1a68667e63cb1b7a35509.tar.bz2 |
Google Summer of Code 2011 Project: Adding support for Jingle File Transfers (XEP-0234), Jingle SOCKS5 Bytestreams Transport Method (XEP-0260), Jingle In-Band Bytestreams Transport Method (XEP-0261) and SOCKS5 Bytestreams (XEP-0065).
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swiften/FileTransfer/OutgoingSIFileTransfer.cpp')
-rw-r--r-- | Swiften/FileTransfer/OutgoingSIFileTransfer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/FileTransfer/OutgoingSIFileTransfer.cpp b/Swiften/FileTransfer/OutgoingSIFileTransfer.cpp index 85ac505..dfcf028 100644 --- a/Swiften/FileTransfer/OutgoingSIFileTransfer.cpp +++ b/Swiften/FileTransfer/OutgoingSIFileTransfer.cpp @@ -32,19 +32,19 @@ void OutgoingSIFileTransfer::start() { void OutgoingSIFileTransfer::stop() { } void OutgoingSIFileTransfer::handleStreamInitiationRequestResponse(StreamInitiation::ref response, ErrorPayload::ref error) { if (error) { finish(FileTransferError()); } else { if (response->getRequestedMethod() == "http://jabber.org/protocol/bytestreams") { - socksServer->addBytestream(id, from, to, bytestream); + socksServer->addReadBytestream(id, from, to, bytestream); Bytestreams::ref bytestreams(new Bytestreams()); bytestreams->setStreamID(id); HostAddressPort addressPort = socksServer->getAddressPort(); bytestreams->addStreamHost(Bytestreams::StreamHost(addressPort.getAddress().toString(), from, addressPort.getPort())); BytestreamsRequest::ref request = BytestreamsRequest::create(to, bytestreams, iqRouter); request->onResponse.connect(boost::bind(&OutgoingSIFileTransfer::handleBytestreamsRequestResponse, this, _1, _2)); request->send(); } else if (response->getRequestedMethod() == "http://jabber.org/protocol/ibb") { @@ -61,18 +61,18 @@ void OutgoingSIFileTransfer::handleBytestreamsRequestResponse(Bytestreams::ref, } //socksServer->onTransferFinished.connect(); } void OutgoingSIFileTransfer::finish(boost::optional<FileTransferError> error) { if (ibbSession) { ibbSession->onFinished.disconnect(boost::bind(&OutgoingSIFileTransfer::handleIBBSessionFinished, this, _1)); ibbSession.reset(); } - socksServer->removeBytestream(id, from, to); + socksServer->removeReadBytestream(id, from, to); onFinished(error); } void OutgoingSIFileTransfer::handleIBBSessionFinished(boost::optional<FileTransferError> error) { finish(error); } } |