From f8f8405b055acb88fa5347a407dc5df01fb02cc8 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 4 Oct 2021 21:30:53 +0200 Subject: [PATCH] state: use new C++ function stateToString() --- common | 2 +- lib/api/requests/status.cpp | 2 +- lib/node.cpp | 2 +- lib/path.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common b/common index 59eaf21fc..06bd16a96 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 59eaf21fc8cd57eba035baa128f9d21743747eed +Subproject commit 06bd16a965a494ccfd4d69ab74a5737c8cb1328c diff --git a/lib/api/requests/status.cpp b/lib/api/requests/status.cpp index 626e39051..0c15d175a 100644 --- a/lib/api/requests/status.cpp +++ b/lib/api/requests/status.cpp @@ -98,7 +98,7 @@ public: json_error_t err; json_t *json_status = json_pack_ex(&err, 0, "{ s: s, s: s, s: s, s: s, s: s, s: s, s: s, s: f, s: f, s: { s: s, s: I, s: b }, s: { s: s, s: s, s: s, s: s, s: s, s: s}, s: { s: i, s: i, s: I, s: I, s: [ f, f, f ], s: { s: I, s, I, s: I, s: I }, s: { s: I, s: I }, s: { s: I, s: I } } }", - "state", state_print(sn->getState()), + "state", stateToString(sn->getState()).c_str(), "version", PROJECT_VERSION_STR, "release", PROJECT_RELEASE, "build_id", PROJECT_BUILD_ID, diff --git a/lib/node.cpp b/lib/node.cpp index d65e68f06..d30ba5c6a 100644 --- a/lib/node.cpp +++ b/lib/node.cpp @@ -713,7 +713,7 @@ json_t * node_to_json(struct vnode *n) json_node = json_pack("{ s: s, s: s, s: s, s: i, s: { s: i, s: o? }, s: { s: i, s: o? } }", "name", node_name_short(n), "uuid", uuid, - "state", state_print(n->state), + "state", stateToString(n->state).c_str(), "affinity", n->affinity, "in", "vectorize", n->in.vectorize, diff --git a/lib/path.cpp b/lib/path.cpp index eb0c310a5..a06e20982 100644 --- a/lib/path.cpp +++ b/lib/path.cpp @@ -833,7 +833,7 @@ json_t * path_to_json(struct vpath *p) json_t *json_path = json_pack("{ s: s, s: s, s: s, s: b, s: b s: b, s: b, s: b, s: b s: i, s: o, s: o, s: o, s: o }", "uuid", uuid, - "state", state_print(p->state), + "state", stateToString(p->state).c_str(), "mode", p->mode == PathMode::ANY ? "any" : "all", "enabled", p->enabled, "builtin", p->builtin,