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);
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue