diff options
Diffstat (limited to 'Swiften/Jingle')
-rw-r--r-- | Swiften/Jingle/IncomingJingleSessionHandler.h | 2 | ||||
-rw-r--r-- | Swiften/Jingle/JingleResponder.cpp | 4 | ||||
-rw-r--r-- | Swiften/Jingle/JingleSessionManager.cpp | 4 | ||||
-rw-r--r-- | Swiften/Jingle/JingleSessionManager.h | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/Swiften/Jingle/IncomingJingleSessionHandler.h b/Swiften/Jingle/IncomingJingleSessionHandler.h index 4d22a4e..d23570d 100644 --- a/Swiften/Jingle/IncomingJingleSessionHandler.h +++ b/Swiften/Jingle/IncomingJingleSessionHandler.h @@ -13,6 +13,6 @@ namespace Swift { public: virtual ~IncomingJingleSessionHandler(); - virtual bool handleIncomingJingleSession(JingleSession::ref, const std::vector<JingleContentPayload::ref>& contents) = 0; + virtual bool handleIncomingJingleSession(JingleSession::ref, const std::vector<JingleContentPayload::ref>& contents, const JID& recipient) = 0; }; } diff --git a/Swiften/Jingle/JingleResponder.cpp b/Swiften/Jingle/JingleResponder.cpp index 63f108e..4c82f51 100644 --- a/Swiften/Jingle/JingleResponder.cpp +++ b/Swiften/Jingle/JingleResponder.cpp @@ -21,7 +21,7 @@ JingleResponder::JingleResponder(JingleSessionManager* sessionManager, IQRouter* JingleResponder::~JingleResponder() { } -bool JingleResponder::handleSetRequest(const JID& from, const JID&, const std::string& id, boost::shared_ptr<JinglePayload> payload) { +bool JingleResponder::handleSetRequest(const JID& from, const JID& to, const std::string& id, boost::shared_ptr<JinglePayload> payload) { if (payload->getAction() == JinglePayload::SessionInitiate) { if (sessionManager->getSession(from, payload->getSessionID())) { // TODO: Add tie-break error @@ -31,7 +31,7 @@ bool JingleResponder::handleSetRequest(const JID& from, const JID&, const std::s sendResponse(from, id, boost::shared_ptr<JinglePayload>()); if (!payload->getInitiator().isBare()) { JingleSessionImpl::ref session = boost::make_shared<JingleSessionImpl>(payload->getInitiator(), from, payload->getSessionID(), router); - sessionManager->handleIncomingSession(from, session, payload->getContents()); + sessionManager->handleIncomingSession(from, to, session, payload->getContents()); } else { SWIFT_LOG(debug) << "Unable to create Jingle session due to initiator not being a full JID." << std::endl; } diff --git a/Swiften/Jingle/JingleSessionManager.cpp b/Swiften/Jingle/JingleSessionManager.cpp index 4299a1e..2e15fcd 100644 --- a/Swiften/Jingle/JingleSessionManager.cpp +++ b/Swiften/Jingle/JingleSessionManager.cpp @@ -40,10 +40,10 @@ void JingleSessionManager::registerOutgoingSession(const JID& initiator, JingleS SWIFT_LOG(debug) << "Added session " << session->getID() << " for initiator " << initiator.toString() << std::endl; } -void JingleSessionManager::handleIncomingSession(const JID& initiator, JingleSessionImpl::ref session, const std::vector<JingleContentPayload::ref>& contents) { +void JingleSessionManager::handleIncomingSession(const JID& initiator, const JID& recipient, JingleSessionImpl::ref session, const std::vector<JingleContentPayload::ref>& contents) { sessions.insert(std::make_pair(JIDSession(initiator, session->getID()), session)); foreach (IncomingJingleSessionHandler* handler, incomingSessionHandlers) { - if (handler->handleIncomingJingleSession(session, contents)) { + if (handler->handleIncomingJingleSession(session, contents, recipient)) { return; } } diff --git a/Swiften/Jingle/JingleSessionManager.h b/Swiften/Jingle/JingleSessionManager.h index 50c429b..b4f2846 100644 --- a/Swiften/Jingle/JingleSessionManager.h +++ b/Swiften/Jingle/JingleSessionManager.h @@ -30,7 +30,7 @@ namespace Swift { void registerOutgoingSession(const JID& initiator, JingleSessionImpl::ref); protected: - void handleIncomingSession(const JID& initiator, JingleSessionImpl::ref, const std::vector<JingleContentPayload::ref>& contents); + void handleIncomingSession(const JID& initiator, const JID& recipient, JingleSessionImpl::ref, const std::vector<JingleContentPayload::ref>& contents); private: IQRouter* router; |