diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-09-27 23:51:34 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-09-27 23:51:34 +0200 |
commit | a7a285eb61dd83afc892bc1d64ffe14b9f1426a3 (patch) | |
tree | 08d2efcaec46e5f5702d9e336a0e8ba7e636aff9 /src/Client/Authenticators | |
parent | b40ba0cf91603b695f1f2380cbd39966a458f22f (diff) | |
download | mad-a7a285eb61dd83afc892bc1d64ffe14b9f1426a3.tar mad-a7a285eb61dd83afc892bc1d64ffe14b9f1426a3.zip |
Completely migrate to Unicode String class
Diffstat (limited to 'src/Client/Authenticators')
-rw-r--r-- | src/Client/Authenticators/ChallengeResponseAuthenticator.cpp | 4 | ||||
-rw-r--r-- | src/Client/Authenticators/PasswordAuthenticator.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp b/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp index 7ccaa63..92ced08 100644 --- a/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp +++ b/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp @@ -40,7 +40,7 @@ void ChallengeResponseAuthenticator::ChallengeResponseAuthRequest::sendRequest() void ChallengeResponseAuthenticator::ChallengeResponseAuthRequest::handlePacket(boost::shared_ptr<const Common::XmlData> packet) { if(packet->getType() == "Error") { - signalFinished(Core::Exception(packet->get<const Core::String&>("Where").extract(), static_cast<Core::Exception::ErrorCode>(packet->get<long>("ErrorCode")), + signalFinished(Core::Exception(packet->get<const Core::String&>("Where"), static_cast<Core::Exception::ErrorCode>(packet->get<long>("ErrorCode")), packet->get<long>("SubCode"), packet->get<long>("SubSubCode"))); return; } @@ -115,7 +115,7 @@ void ChallengeResponseAuthenticator::authenticate(Common::Application *applicati throw Core::Exception(Core::Exception::NOT_AVAILABLE); } - application->logf(Core::Logger::LOG_VERBOSE, "Authenticating with method 'Challenge-Response' using hash '%s'...", hash.extract().c_str()); + application->logf(Core::Logger::LOG_VERBOSE, "Authenticating with method 'Challenge-Response' using hash '%s'...", hash.toLocale().c_str()); boost::shared_ptr<ChallengeResponseAuthRequest> request(new ChallengeResponseAuthRequest(application, username, password, hash)); diff --git a/src/Client/Authenticators/PasswordAuthenticator.cpp b/src/Client/Authenticators/PasswordAuthenticator.cpp index 2ac9d68..ac01d44 100644 --- a/src/Client/Authenticators/PasswordAuthenticator.cpp +++ b/src/Client/Authenticators/PasswordAuthenticator.cpp @@ -38,7 +38,7 @@ void PasswordAuthenticator::PasswordAuthRequest::sendRequest() { if(hash == "Clear") { - std::string passwordStr = password.extractUTF8(); + std::string passwordStr = password.toUTF8(); packet.set("data", std::vector<boost::uint8_t>(passwordStr.begin(), passwordStr.end())); } else { @@ -50,7 +50,7 @@ void PasswordAuthenticator::PasswordAuthRequest::sendRequest() { void PasswordAuthenticator::PasswordAuthRequest::handlePacket(boost::shared_ptr<const Common::XmlData> packet) { if(packet->getType() == "Error") { - signalFinished(Core::Exception(packet->get<const Core::String&>("Where").extract(), static_cast<Core::Exception::ErrorCode>(packet->get<long>("ErrorCode")), + signalFinished(Core::Exception(packet->get<const Core::String&>("Where"), static_cast<Core::Exception::ErrorCode>(packet->get<long>("ErrorCode")), packet->get<long>("SubCode"), packet->get<long>("SubSubCode"))); return; } @@ -98,7 +98,7 @@ void PasswordAuthenticator::authenticate(Common::Application *application, Commo throw Core::Exception(Core::Exception::NOT_AVAILABLE); } - application->logf(Core::Logger::LOG_VERBOSE, "Authenticating with method 'Password' using hash '%s'...", hash.extract().c_str()); + application->logf(Core::Logger::LOG_VERBOSE, "Authenticating with method 'Password' using hash '%s'...", hash.toLocale().c_str()); boost::shared_ptr<PasswordAuthRequest> request(new PasswordAuthRequest(application, username, password, hash)); |