summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-08-28 09:19:46 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-08-28 09:19:46 (GMT)
commit5f1cb0d768265347bc80862c33f5967f07759b10 (patch)
tree979eceddcd0f5e6a651180b91d0908e1e1e319b7 /Swiften/Queries/IQRouter.h
parent8dbae452004e7bc3c3a6e855f365b9bb348e8f2d (diff)
downloadswift-contrib-5f1cb0d768265347bc80862c33f5967f07759b10.zip
swift-contrib-5f1cb0d768265347bc80862c33f5967f07759b10.tar.bz2
Check sender on incoming IQ responses.
Release-Notes: Fixed a bug whereby the sender of an iq wasn't being checked before matching it to a request.
Diffstat (limited to 'Swiften/Queries/IQRouter.h')
-rw-r--r--Swiften/Queries/IQRouter.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/Swiften/Queries/IQRouter.h b/Swiften/Queries/IQRouter.h
index 312dca8..a21b24d 100644
--- a/Swiften/Queries/IQRouter.h
+++ b/Swiften/Queries/IQRouter.h
@@ -22,6 +22,20 @@ namespace Swift {
~IQRouter();
/**
+ * Sets the JID of this IQ router.
+ *
+ * This JID is used by requests to check whether incoming
+ * results are addressed correctly.
+ */
+ void setJID(const JID& jid) {
+ jid_ = jid;
+ }
+
+ const JID& getJID() {
+ return jid_;
+ }
+
+ /**
* Sets the 'from' JID for all outgoing IQ stanzas.
*
* By default, IQRouter does not add a from to IQ stanzas, since
@@ -55,6 +69,7 @@ namespace Swift {
private:
IQChannel* channel_;
+ JID jid_;
JID from_;
std::vector< boost::shared_ptr<IQHandler> > handlers_;
std::vector< boost::shared_ptr<IQHandler> > queuedRemoves_;