summaryrefslogtreecommitdiffstats
path: root/src/Client
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-08-24 03:06:32 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-08-24 03:06:32 +0200
commit84a5ceeb7db03d75425d72e8a23a0bb0f267bc01 (patch)
tree7a7702429a7cdbc06144b2141eb80ee2aa462d39 /src/Client
parent415cd36477e152c12f91a10ad61bb719373cd9d1 (diff)
downloadmad-84a5ceeb7db03d75425d72e8a23a0bb0f267bc01.tar
mad-84a5ceeb7db03d75425d72e8a23a0bb0f267bc01.zip
Hash-Klasse hinzugefügt
Diffstat (limited to 'src/Client')
-rw-r--r--src/Client/Authenticators/PasswordAuthenticator.cpp3
-rw-r--r--src/Client/CommandParser.cpp2
-rw-r--r--src/Client/InformationManager.cpp2
-rw-r--r--src/Client/SystemCommands.cpp8
-rw-r--r--src/Client/UserCommands.cpp26
5 files changed, 20 insertions, 21 deletions
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<boost::uint8_t> challenge(password.begin(), password.end());
- packet.set("challenge", challenge);
+ packet.set("data", std::vector<boost::uint8_t>(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<std::string> &/*args*/) {
std::pair<boost::shared_ptr<const Common::XmlPacket>, 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<const Commo
boost::lock_guard<boost::mutex> 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<boost::shared_ptr<const Common::XmlPacket>, 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<boost::shared_ptr<const Common::XmlPacket>, 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<boost::shared_ptr<const Common::XmlPacket>, 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<boost::shared_ptr<const Common::XmlPacket>, 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;
}
}