summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/FileTransfer/IncomingJingleFileTransfer.cpp4
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/JingleParserTest.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp b/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
index 1189830..0481a47 100644
--- a/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
+++ b/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
@@ -243,11 +243,11 @@ void IncomingJingleFileTransfer::handleSessionInfoReceived(JinglePayload::ref ji
SWIFT_LOG(debug) << "Recevied hash information." << std::endl;
if (transferHash->getHashes().find("sha-1") != transferHash->getHashes().end()) {
algo = "sha-1";
- hash = transferHash->getHashes().at("sha-1");
+ hash = transferHash->getHashes().find("sha-1")->second;
}
else if (transferHash->getHashes().find("md5") != transferHash->getHashes().end()) {
algo = "md5";
- hash = transferHash->getHashes().at("md5");
+ hash = transferHash->getHashes().find("md5")->second;
}
checkIfAllDataReceived();
}
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/JingleParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/JingleParserTest.cpp
index d03ba8b..f1f25cd 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/JingleParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/JingleParserTest.cpp
@@ -410,7 +410,7 @@ class JingleParserTest : public CppUnit::TestFixture {
JingleFileTransferHash::ref hash = jingle->getPayload<JingleFileTransferHash>();
CPPUNIT_ASSERT(hash);
- CPPUNIT_ASSERT_EQUAL(std::string("552da749930852c69ae5d2141d3766b1"), hash->getHashes().at("sha-1"));
+ CPPUNIT_ASSERT_EQUAL(std::string("552da749930852c69ae5d2141d3766b1"), hash->getHashes().find("sha-1")->second);
}