diff options
Diffstat (limited to 'src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp')
-rw-r--r-- | src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp b/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp index 1348541..d446485 100644 --- a/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp +++ b/src/Server/RequestHandlers/ConnectionRequestHandlerGroup.cpp @@ -37,17 +37,17 @@ void ConnectionRequestHandlerGroup::handleAuthMethodRequest(boost::shared_ptr<co Common::XmlData::List *list = ret->createList("methods"); - std::set<std::string> methods = application->getAuthManager()->getMethods(); + std::set<Core::String> methods = application->getAuthManager()->getMethods(); - for(std::set<std::string>::iterator method = methods.begin(); method != methods.end(); ++method) { + for(std::set<Core::String>::iterator method = methods.begin(); method != methods.end(); ++method) { Common::XmlData::List::iterator entry = list->addEntry(); entry->set("name", *method); Common::XmlData::List *subList = entry->createList("subMethods"); - std::vector<std::string> subMethods = application->getAuthManager()->getSubMethods(*method); + std::vector<Core::String> subMethods = application->getAuthManager()->getSubMethods(*method); - for(std::vector<std::string>::iterator subMethod = subMethods.begin(); subMethod != subMethods.end(); ++subMethod) { + for(std::vector<Core::String>::iterator subMethod = subMethods.begin(); subMethod != subMethods.end(); ++subMethod) { Common::XmlData::List::iterator subEntry = subList->addEntry(); subEntry->set("name", *subMethod); @@ -59,8 +59,8 @@ void ConnectionRequestHandlerGroup::handleAuthRequest(boost::shared_ptr<const Co std::vector<boost::uint8_t> response; boost::shared_ptr<const Common::AuthContext> authContext = application->getConnectionManager()->authenticateConnection(connection, - packet->get<const std::string&>("method"), packet->get<const std::string&>("subMethod"), - packet->get<const std::string&>("user"), packet->get<const std::vector<boost::uint8_t>&>("data"), + packet->get<const Core::String&>("method"), packet->get<const Core::String&>("subMethod"), + packet->get<const Core::String&>("user"), packet->get<const std::vector<boost::uint8_t>&>("data"), response); if(!response.empty()) @@ -86,13 +86,13 @@ void ConnectionRequestHandlerGroup::handleDaemonListRequest(boost::shared_ptr<co Common::XmlData::List::iterator entry = list->addEntry(); entry->set("name", daemon->getName()); - entry->set("address", daemon->getIP()); + entry->set("address", daemon->getIP().c_str()); entry->set("state", daemon->getState()); } } void ConnectionRequestHandlerGroup::handleIdentifyRequest(boost::shared_ptr<const Common::XmlData> packet, Common::XmlData *ret, Common::Connection *connection) { - application->getConnectionManager()->identifyDaemonConnection(connection, packet->get<const std::string&>("hostname")); + application->getConnectionManager()->identifyDaemonConnection(connection, packet->get<const Core::String&>("hostname")); ret->setType("OK"); } @@ -102,10 +102,10 @@ void ConnectionRequestHandlerGroup::handleLogRequest(boost::shared_ptr<const Com boost::posix_time::ptime timestamp(boost::posix_time::not_a_date_time); - const std::string ×tr = packet->get<const std::string&>("timestamp"); - if(!timestr.empty()) { + const Core::String ×tr = packet->get<const Core::String&>("timestamp"); + if(!timestr.isEmpty()) { try { - timestamp = boost::posix_time::from_iso_string(timestr); + timestamp = boost::posix_time::from_iso_string(timestr.extract()); } catch(...) {} } @@ -115,8 +115,8 @@ void ConnectionRequestHandlerGroup::handleLogRequest(boost::shared_ptr<const Com static_cast<Core::Logger::MessageCategory>(packet->get<long>("category")), static_cast<Core::Logger::MessageLevel>(packet->get<long>("level")), timestamp, - packet->get<const std::string&>("message"), - application->getConnectionManager()->getDaemonName(connection)); + packet->get<const Core::String&>("message").extract(), + application->getConnectionManager()->getDaemonName(connection).extract()); } catch(Core::Exception &e) { application->logf(Core::Logger::LOG_ERROR, "Can't determine daemon name: %s", e.what()); |