diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-08-28 09:19:46 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-08-28 09:19:46 (GMT) |
commit | 5f1cb0d768265347bc80862c33f5967f07759b10 (patch) | |
tree | 979eceddcd0f5e6a651180b91d0908e1e1e319b7 /Swiften/VCards | |
parent | 8dbae452004e7bc3c3a6e855f365b9bb348e8f2d (diff) | |
download | swift-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/VCards')
-rw-r--r-- | Swiften/VCards/UnitTest/VCardManagerTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/VCards/UnitTest/VCardManagerTest.cpp b/Swiften/VCards/UnitTest/VCardManagerTest.cpp index 9274639..fa46306 100644 --- a/Swiften/VCards/UnitTest/VCardManagerTest.cpp +++ b/Swiften/VCards/UnitTest/VCardManagerTest.cpp @@ -92,7 +92,7 @@ class VCardManagerTest : public CppUnit::TestFixture { void testRequest_Error() { std::auto_ptr<VCardManager> testling = createManager(); testling->requestVCard(JID("foo@bar.com/baz")); - stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getID())); + stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID())); CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(changes.size())); CPPUNIT_ASSERT_EQUAL(JID("foo@bar.com/baz"), changes[0].first); @@ -180,17 +180,17 @@ class VCardManagerTest : public CppUnit::TestFixture { IQ::ref createVCardResult() { VCard::ref vcard(new VCard()); vcard->setFullName("Foo Bar"); - return IQ::createResult(JID("baz@fum.com/dum"), stanzaChannel->sentStanzas[0]->getID(), vcard); + return IQ::createResult(JID("baz@fum.com/dum"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID(), vcard); } IQ::ref createOwnVCardResult() { VCard::ref vcard(new VCard()); vcard->setFullName("Myself"); - return IQ::createResult(JID(), stanzaChannel->sentStanzas[0]->getID(), vcard); + return IQ::createResult(JID(), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID(), vcard); } IQ::ref createSetVCardResult() { - return IQ::createResult(JID("baz@fum.com/dum"), stanzaChannel->sentStanzas[0]->getID(), VCard::ref()); + return IQ::createResult(JID("baz@fum.com/dum"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID(), VCard::ref()); } |