From 84a5ceeb7db03d75425d72e8a23a0bb0f267bc01 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 24 Aug 2009 03:06:32 +0200 Subject: =?UTF-8?q?Hash-Klasse=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Authenticators/PasswordAuthenticator.cpp | 3 +-- src/Client/CommandParser.cpp | 2 +- src/Client/InformationManager.cpp | 2 +- src/Client/SystemCommands.cpp | 8 +++---- src/Client/UserCommands.cpp | 26 +++++++++++----------- 5 files changed, 20 insertions(+), 21 deletions(-) (limited to 'src/Client') diff --git a/src/Client/Authenticators/PasswordAuthenticator.cpp b/src/Client/Authenticators/PasswordAuthenticator.cpp index 44608db..3aa9f41 100644 --- a/src/Client/Authenticators/PasswordAuthenticator.cpp +++ b/src/Client/Authenticators/PasswordAuthenticator.cpp @@ -31,8 +31,7 @@ void PasswordAuthenticator::PasswordAuthRequest::sendRequest() { packet.set("method", "Password"); packet.set("user", username); - std::vector challenge(password.begin(), password.end()); - packet.set("challenge", challenge); + packet.set("data", std::vector(password.begin(), password.end())); sendPacket(packet); } diff --git a/src/Client/CommandParser.cpp b/src/Client/CommandParser.cpp index 56ecbba..ed0f47e 100644 --- a/src/Client/CommandParser.cpp +++ b/src/Client/CommandParser.cpp @@ -205,7 +205,7 @@ void CommandParser::exitCommand(const std::vector &/*args*/) { std::pair, Core::Exception> result = request->getResult(); if(result.second) - std::cerr << "An error occurred during your request: " << result.second.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << result.second.what() << "." << std::endl; else disconnect = true; } diff --git a/src/Client/InformationManager.cpp b/src/Client/InformationManager.cpp index 59d8836..108a2a5 100644 --- a/src/Client/InformationManager.cpp +++ b/src/Client/InformationManager.cpp @@ -72,7 +72,7 @@ void InformationManager::daemonListRequestFinished(boost::shared_ptr lock(mutex); if(!packet || error) { - application->logf(Core::LoggerBase::LOG_CRITICAL, "Host list request failed: %s", error.strerror().c_str()); + application->logf(Core::LoggerBase::LOG_CRITICAL, "Host list request failed: %s", error.what()); } else { const Common::XmlPacket::List *list = packet->getList("hosts"); diff --git a/src/Client/SystemCommands.cpp b/src/Client/SystemCommands.cpp index 1cc9bc4..f1bcbbd 100644 --- a/src/Client/SystemCommands.cpp +++ b/src/Client/SystemCommands.cpp @@ -168,7 +168,7 @@ void SystemCommands::fsinfoCommand(CommandParser *commandParser, const std::vect std::pair, Core::Exception> result = request->getResult(); if(!result.first || result.second) { - std::cerr << "An error occurred during your request: " << result.second.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << result.second.what() << "." << std::endl; } else { if(args.size() == 1) @@ -205,7 +205,7 @@ void SystemCommands::rebootCommand(CommandParser *commandParser, const std::vect std::pair, Core::Exception> result = (*request)->getResult(); if(result.second) - std::cerr << "An error occurred during your request: " << result.second.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << result.second.what() << "." << std::endl; } } @@ -234,7 +234,7 @@ void SystemCommands::shutdownCommand(CommandParser *commandParser, const std::ve std::pair, Core::Exception> result = (*request)->getResult(); if(result.second) - std::cerr << "An error occurred during your request: " << result.second.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << result.second.what() << "." << std::endl; } } @@ -257,7 +257,7 @@ void SystemCommands::statusCommand(CommandParser *commandParser, const std::vect std::pair, Core::Exception> result = request->getResult(); if(!result.first || result.second) { - std::cerr << "An error occurred during your request: " << result.second.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << result.second.what() << "." << std::endl; } else { if(args.size() == 1) diff --git a/src/Client/UserCommands.cpp b/src/Client/UserCommands.cpp index 166a54d..a1d190a 100644 --- a/src/Client/UserCommands.cpp +++ b/src/Client/UserCommands.cpp @@ -89,7 +89,7 @@ void UserCommands::listUsersCommand(CommandParser *commandParser, const std::vec std::cout << std::endl; } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } @@ -132,7 +132,7 @@ void UserCommands::userInfoCommand(CommandParser *commandParser, const std::vect } } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } @@ -154,7 +154,7 @@ void UserCommands::listGroupsCommand(CommandParser *commandParser, const std::ve std::cout << std::endl; } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } @@ -197,7 +197,7 @@ void UserCommands::groupInfoCommand(CommandParser *commandParser, const std::vec } } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } @@ -238,7 +238,7 @@ void UserCommands::addUserCommand(CommandParser *commandParser, const std::vecto std::cout << "User added." << std::endl; } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } @@ -286,7 +286,7 @@ void UserCommands::updateUserCommand(CommandParser *commandParser, const std::ve std::cout << "User updated." << std::endl; } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } @@ -316,7 +316,7 @@ void UserCommands::deleteUserCommand(CommandParser *commandParser, const std::ve std::cout << "User deleted." << std::endl; } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } @@ -346,7 +346,7 @@ void UserCommands::addGroupCommand(CommandParser *commandParser, const std::vect std::cout << "Group added." << std::endl; } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } @@ -383,7 +383,7 @@ void UserCommands::updateGroupCommand(CommandParser *commandParser, const std::v std::cout << "Group updated." << std::endl; } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } @@ -413,7 +413,7 @@ void UserCommands::deleteGroupCommand(CommandParser *commandParser, const std::v std::cout << "Group deleted." << std::endl; } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } @@ -450,7 +450,7 @@ void UserCommands::addUserToGroupCommand(CommandParser *commandParser, const std std::cout << "Added." << std::endl; } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } @@ -487,7 +487,7 @@ void UserCommands::deleteUserFromGroupCommand(CommandParser *commandParser, cons std::cout << "Removed." << std::endl; } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } @@ -525,7 +525,7 @@ void UserCommands::setPasswordCommand(CommandParser *commandParser, const std::v std::cout << "Password set." << std::endl; } catch(Core::Exception e) { - std::cerr << "An error occurred during your request: " << e.strerror() << "." << std::endl; + std::cerr << "An error occurred during your request: " << e.what() << "." << std::endl; } } -- cgit v1.2.3