summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/PayloadParsers')
-rw-r--r--Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp3
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/JingleParserTest.cpp8
2 files changed, 10 insertions, 1 deletions
diff --git a/Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp b/Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp
index d7b5bb0..dc05352 100644
--- a/Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp
+++ b/Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp
@@ -5,7 +5,7 @@
*/
/*
-* Copyright (c) 2014 Isode Limited.
+* Copyright (c) 2014-2015 Isode Limited.
* All rights reserved.v3.
* See the COPYING file for more information.
*/
@@ -34,6 +34,7 @@ namespace Swift {
SWIFT_LOG(warning) << "Unknown S5B mode; falling back to defaul!";
getPayloadInternal()->setMode(JingleS5BTransportPayload::TCPMode);
}
+ getPayloadInternal()->setDstAddr(attributes.getAttributeValue("dstaddr").get_value_or(""));
} else if (level == 1) {
if (element == "candidate") {
JingleS5BTransportPayload::Candidate candidate;
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/JingleParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/JingleParserTest.cpp
index a6be599..9c166b2 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/JingleParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/JingleParserTest.cpp
@@ -4,6 +4,12 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2015 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -540,6 +546,7 @@ class JingleParserTest : public CppUnit::TestFixture {
" <content creator='initiator' name='ex'>\n"
" <description xmlns='urn:xmpp:example'/>\n"
" <transport xmlns='urn:xmpp:jingle:transports:s5b:1'\n"
+ " dstaddr='1a12fb7bc625e55f3ed5b29a53dbe0e4aa7d80ba'\n"
" mode='tcp'\n"
" sid='vj3hs98y'>\n"
" <candidate cid='ht567dq'\n"
@@ -579,6 +586,7 @@ class JingleParserTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT_EQUAL(std::string("vj3hs98y"), s5bPayload->getSessionID());
CPPUNIT_ASSERT_EQUAL(JingleS5BTransportPayload::TCPMode, s5bPayload->getMode());
+ CPPUNIT_ASSERT_EQUAL(std::string("1a12fb7bc625e55f3ed5b29a53dbe0e4aa7d80ba"), s5bPayload->getDstAddr());
CPPUNIT_ASSERT_EQUAL(false, s5bPayload->hasCandidateError());
CPPUNIT_ASSERT_EQUAL(false, s5bPayload->hasProxyError());
CPPUNIT_ASSERT_EQUAL(std::string(), s5bPayload->getActivated());