diff options
Diffstat (limited to 'Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp')
-rw-r--r-- | Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp b/Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp index 14a80e6..7be4c26 100644 --- a/Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp +++ b/Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp @@ -1,15 +1,21 @@ /* * Copyright (c) 2011 Tobias Markmann * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* +* Copyright (c) 2014 Kevin Smith +* Licensed under the GNU General Public License v3. +* See Documentation/Licenses/GPLv3.txt for more information. +*/ + #include <boost/lexical_cast.hpp> #include <boost/optional.hpp> #include "JingleS5BTransportMethodPayloadParser.h" #include <Swiften/Base/Log.h> namespace Swift { JingleS5BTransportMethodPayloadParser::JingleS5BTransportMethodPayloadParser() : level(0) { @@ -19,19 +25,19 @@ namespace Swift { void JingleS5BTransportMethodPayloadParser::handleStartElement(const std::string& element, const std::string&, const AttributeMap& attributes) { if (level == 0) { getPayloadInternal()->setSessionID(attributes.getAttributeValue("sid").get_value_or("")); std::string mode = attributes.getAttributeValue("mode").get_value_or("tcp"); if (mode == "tcp") { getPayloadInternal()->setMode(JingleS5BTransportPayload::TCPMode); } else if(mode == "udp") { getPayloadInternal()->setMode(JingleS5BTransportPayload::UDPMode); } else { - std::cerr << "Unknown S5B mode; falling back to defaul!" << std::endl; + SWIFT_LOG(warning) << "Unknown S5B mode; falling back to defaul!"; getPayloadInternal()->setMode(JingleS5BTransportPayload::TCPMode); } } else if (level == 1) { if (element == "candidate") { JingleS5BTransportPayload::Candidate candidate; candidate.cid = attributes.getAttributeValue("cid").get_value_or(""); int port = -1; try { @@ -75,14 +81,14 @@ namespace Swift { if (str == "direct") { return JingleS5BTransportPayload::Candidate::DirectType; } else if (str == "assisted") { return JingleS5BTransportPayload::Candidate::AssistedType; } else if (str == "tunnel") { return JingleS5BTransportPayload::Candidate::TunnelType; } else if (str == "proxy") { return JingleS5BTransportPayload::Candidate::ProxyType; } else { - std::cerr << "Unknown candidate type; falling back to default!" << std::endl; + SWIFT_LOG(warning) << "Unknown candidate type; falling back to default!"; return JingleS5BTransportPayload::Candidate::DirectType; } } } |