mirror of https://gitee.com/bigwinds/arangodb
VisualStudio warnings
This commit is contained in:
parent
a11ed509a1
commit
173a6010b5
|
@ -283,9 +283,9 @@ void Agent::run() {
|
||||||
_cv.wait(250000);
|
_cv.wait(250000);
|
||||||
else
|
else
|
||||||
_cv.wait();
|
_cv.wait();
|
||||||
std::vector<collect_ret_t> work(size());
|
|
||||||
// Collect all unacknowledged
|
// Collect all unacknowledged
|
||||||
for (size_t i = 0; i < size(); ++i) {
|
for (id_t i = 0; i < size(); ++i) {
|
||||||
if (i != id()) {
|
if (i != id()) {
|
||||||
sendAppendEntriesRPC(i);
|
sendAppendEntriesRPC(i);
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,11 @@ inline HttpHandler::status_t RestAgencyHandler::handleWrite () {
|
||||||
query = _request->toVelocyPack(&options);
|
query = _request->toVelocyPack(&options);
|
||||||
} catch (std::exception const& e) {
|
} catch (std::exception const& e) {
|
||||||
LOG_TOPIC(ERR, Logger::AGENCY) << e.what();
|
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);
|
return HttpHandler::status_t(HANDLER_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +169,7 @@ inline HttpHandler::status_t RestAgencyHandler::handleRead () {
|
||||||
return HttpHandler::status_t(HANDLER_DONE);
|
return HttpHandler::status_t(HANDLER_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpHandler::status_t RestAgencyHandler::handleTest() {
|
HttpHandler::status_t RestAgencyHandler::handleConfig() {
|
||||||
Builder body;
|
Builder body;
|
||||||
body.add(VPackValue(VPackValueType::Object));
|
body.add(VPackValue(VPackValueType::Object));
|
||||||
body.add("term", Value(_agent->term()));
|
body.add("term", Value(_agent->term()));
|
||||||
|
@ -206,7 +210,7 @@ HttpHandler::status_t RestAgencyHandler::execute() {
|
||||||
if (_request->requestType() != HttpRequest::HTTP_REQUEST_GET) {
|
if (_request->requestType() != HttpRequest::HTTP_REQUEST_GET) {
|
||||||
return reportMethodNotAllowed();
|
return reportMethodNotAllowed();
|
||||||
}
|
}
|
||||||
return handleTest();
|
return handleConfig();
|
||||||
} else if (_request->suffix()[0] == "state") {
|
} else if (_request->suffix()[0] == "state") {
|
||||||
if (_request->requestType() != HttpRequest::HTTP_REQUEST_GET) {
|
if (_request->requestType() != HttpRequest::HTTP_REQUEST_GET) {
|
||||||
return reportMethodNotAllowed();
|
return reportMethodNotAllowed();
|
||||||
|
|
|
@ -50,7 +50,7 @@ class RestAgencyHandler : public arangodb::RestBaseHandler {
|
||||||
status_t reportUnknownMethod() ;
|
status_t reportUnknownMethod() ;
|
||||||
status_t handleRead() ;
|
status_t handleRead() ;
|
||||||
status_t handleWrite() ;
|
status_t handleWrite() ;
|
||||||
status_t handleTest();
|
status_t handleConfig();
|
||||||
status_t reportMethodNotAllowed();
|
status_t reportMethodNotAllowed();
|
||||||
status_t handleState();
|
status_t handleState();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue