summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ceb89ae)
raw | patch | inline | side by side (parent: ceb89ae)
author | Florian Forster <octo@collectd.org> | |
Thu, 11 Aug 2016 05:53:10 +0000 (07:53 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 11 Aug 2016 05:53:10 +0000 (07:53 +0200) |
src/grpc.cc | patch | blob | history |
diff --git a/src/grpc.cc b/src/grpc.cc
index 53b8fa53a87e52a8d1d2fabae54e9656feb9947a..42c6b327ba99801de1012b75b000081a8f21ccc3 100644 (file)
--- a/src/grpc.cc
+++ b/src/grpc.cc
public:
grpc::Status QueryValues(grpc::ServerContext *ctx, QueryValuesRequest const *req, grpc::ServerWriter<QueryValuesResponse> *writer) override {
value_list_t match;
- auto err = unmarshal_ident(req->identifier(), &match, false);
- if (!err.ok()) {
- return err;
+ auto status = unmarshal_ident(req->identifier(), &match, false);
+ if (!status.ok()) {
+ return status;
}
std::queue<value_list_t> value_lists;
- err = this->queryValuesRead(&match, &value_lists);
- if (err.ok()) {
- err = this->queryValuesWrite(ctx, writer, &value_lists);
+ status = this->queryValuesRead(&match, &value_lists);
+ if (status.ok()) {
+ status = this->queryValuesWrite(ctx, writer, &value_lists);
}
while (!value_lists.empty()) {
sfree(vl.values);
}
- return err;
+ return status;
}
grpc::Status DispatchValues(grpc::ServerContext *ctx,
QueryValuesResponse res;
res.Clear();
- auto err = marshal_value_list(&vl, res.mutable_value_list());
- if (!err.ok()) {
- return err;
+ auto status = marshal_value_list(&vl, res.mutable_value_list());
+ if (!status.ok()) {
+ return status;
}
if (!writer->Write(res)) {