1
0
Fork 0

VisualStudio warnings

This commit is contained in:
Kaveh Vahedipour 2016-03-29 13:01:23 +02:00
parent a11ed509a1
commit 173a6010b5
3 changed files with 10 additions and 6 deletions

View File

@ -283,9 +283,9 @@ void Agent::run() {
_cv.wait(250000);
else
_cv.wait();
std::vector<collect_ret_t> work(size());
// Collect all unacknowledged
for (size_t i = 0; i < size(); ++i) {
for (id_t i = 0; i < size(); ++i) {
if (i != id()) {
sendAppendEntriesRPC(i);
}

View File

@ -89,7 +89,11 @@ inline HttpHandler::status_t RestAgencyHandler::handleWrite () {
query = _request->toVelocyPack(&options);
} catch (std::exception const& e) {
LOG_TOPIC(ERR, Logger::AGENCY) << e.what();
generateError(HttpResponse::UNPROCESSABLE_ENTITY,422);
Builder body;
body.openObject();
body.add("message", VPackValue(e.what()));
body.close();
generateResult(HttpResponse::BAD,body.slice());
return HttpHandler::status_t(HANDLER_DONE);
}
@ -165,7 +169,7 @@ inline HttpHandler::status_t RestAgencyHandler::handleRead () {
return HttpHandler::status_t(HANDLER_DONE);
}
HttpHandler::status_t RestAgencyHandler::handleTest() {
HttpHandler::status_t RestAgencyHandler::handleConfig() {
Builder body;
body.add(VPackValue(VPackValueType::Object));
body.add("term", Value(_agent->term()));
@ -206,7 +210,7 @@ HttpHandler::status_t RestAgencyHandler::execute() {
if (_request->requestType() != HttpRequest::HTTP_REQUEST_GET) {
return reportMethodNotAllowed();
}
return handleTest();
return handleConfig();
} else if (_request->suffix()[0] == "state") {
if (_request->requestType() != HttpRequest::HTTP_REQUEST_GET) {
return reportMethodNotAllowed();

View File

@ -50,7 +50,7 @@ class RestAgencyHandler : public arangodb::RestBaseHandler {
status_t reportUnknownMethod() ;
status_t handleRead() ;
status_t handleWrite() ;
status_t handleTest();
status_t handleConfig();
status_t reportMethodNotAllowed();
status_t handleState();