summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-09-29 18:55:02 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-09-29 18:55:02 (GMT)
commit06a49ccc9554f2ce9e6d7b381543819590ea30ed (patch)
tree3b2c6931176633b99afcf40729e2923ecaa1e151 /Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
parent4b4ab66118545e55e69e15cd340d0ddf92adcc2d (diff)
downloadswift-contrib-06a49ccc9554f2ce9e6d7b381543819590ea30ed.zip
swift-contrib-06a49ccc9554f2ce9e6d7b381543819590ea30ed.tar.bz2
Allow to set 'from' on Request & IBB classes.
Diffstat (limited to 'Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp')
-rw-r--r--Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp b/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
index 9b71165..5e2a1c3 100644
--- a/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
+++ b/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
@@ -39,12 +39,13 @@ OutgoingJingleFileTransfer::OutgoingJingleFileTransfer(JingleSession::ref sessio
LocalJingleTransportCandidateGeneratorFactory* localFactory,
IQRouter* router,
IDGenerator *idGenerator,
+ const JID& fromJID,
const JID& toJID,
boost::shared_ptr<ReadBytestream> readStream,
const StreamInitiationFileInfo &fileInfo,
SOCKS5BytestreamRegistry* bytestreamRegistry,
SOCKS5BytestreamProxy* bytestreamProxy) :
- session(session), remoteFactory(remoteFactory), localFactory(localFactory), router(router), idGenerator(idGenerator), toJID(toJID), readStream(readStream), fileInfo(fileInfo), s5bRegistry(bytestreamRegistry), s5bProxy(bytestreamProxy), serverSession(NULL), contentID(JingleContentID(idGenerator->generateID(), JingleContentPayload::InitiatorCreator)), canceled(false) {
+ session(session), remoteFactory(remoteFactory), localFactory(localFactory), router(router), idGenerator(idGenerator), fromJID(fromJID), toJID(toJID), readStream(readStream), fileInfo(fileInfo), s5bRegistry(bytestreamRegistry), s5bProxy(bytestreamProxy), serverSession(NULL), contentID(JingleContentID(idGenerator->generateID(), JingleContentPayload::InitiatorCreator)), canceled(false) {
session->onSessionAcceptReceived.connect(boost::bind(&OutgoingJingleFileTransfer::handleSessionAcceptReceived, this, _1, _2, _3));
session->onSessionTerminateReceived.connect(boost::bind(&OutgoingJingleFileTransfer::handleSessionTerminateReceived, this, _1));
session->onTransportInfoReceived.connect(boost::bind(&OutgoingJingleFileTransfer::handleTransportInfoReceived, this, _1, _2));
@@ -109,7 +110,7 @@ void OutgoingJingleFileTransfer::handleSessionAcceptReceived(const JingleContent
JingleIBBTransportPayload::ref ibbPayload;
JingleS5BTransportPayload::ref s5bPayload;
if ((ibbPayload = boost::dynamic_pointer_cast<JingleIBBTransportPayload>(transportPayload))) {
- ibbSession = boost::make_shared<IBBSendSession>(ibbPayload->getSessionID(), toJID, readStream, router);
+ ibbSession = boost::make_shared<IBBSendSession>(ibbPayload->getSessionID(), fromJID, toJID, readStream, router);
ibbSession->setBlockSize(ibbPayload->getBlockSize());
ibbSession->onBytesSent.connect(boost::bind(boost::ref(onProcessedBytes), _1));
ibbSession->onFinished.connect(boost::bind(&OutgoingJingleFileTransfer::handleTransferFinished, this, _1));
@@ -163,7 +164,7 @@ void OutgoingJingleFileTransfer::handleTransportAcceptReceived(const JingleConte
}
if (JingleIBBTransportPayload::ref ibbPayload = boost::dynamic_pointer_cast<JingleIBBTransportPayload>(transport)) {
- ibbSession = boost::make_shared<IBBSendSession>(ibbPayload->getSessionID(), toJID, readStream, router);
+ ibbSession = boost::make_shared<IBBSendSession>(ibbPayload->getSessionID(), fromJID, toJID, readStream, router);
ibbSession->setBlockSize(ibbPayload->getBlockSize());
ibbSession->onBytesSent.connect(boost::bind(boost::ref(onProcessedBytes), _1));
ibbSession->onFinished.connect(boost::bind(&OutgoingJingleFileTransfer::handleTransferFinished, this, _1));