mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
improve coding style
This commit is contained in:
parent
a1c411a4fc
commit
e3ec18df73
7 changed files with 8 additions and 0 deletions
|
@ -31,6 +31,7 @@ class CapabilitiesAction : public Action {
|
|||
|
||||
public:
|
||||
using Action::Action;
|
||||
|
||||
virtual int execute(json_t *args, json_t **resp)
|
||||
{
|
||||
json_t *json_hooks = json_array();
|
||||
|
|
|
@ -32,6 +32,7 @@ class ConfigAction : public Action {
|
|||
|
||||
public:
|
||||
using Action::Action;
|
||||
|
||||
virtual int execute(json_t *args, json_t **resp)
|
||||
{
|
||||
json_t *cfg = session->getSuperNode()->getConfig();
|
||||
|
|
|
@ -37,6 +37,7 @@ class NodesAction : public Action {
|
|||
|
||||
public:
|
||||
using Action::Action;
|
||||
|
||||
virtual int execute(json_t *args, json_t **resp)
|
||||
{
|
||||
json_t *json_nodes = json_array();
|
||||
|
|
|
@ -36,6 +36,7 @@ class PathsAction : public Action {
|
|||
|
||||
public:
|
||||
using Action::Action;
|
||||
|
||||
virtual int execute(json_t *args, json_t **resp)
|
||||
{
|
||||
json_t *json_paths = json_array();
|
||||
|
|
|
@ -46,6 +46,7 @@ protected:
|
|||
const char *argv[] = { "villas-node", cfg, nullptr };
|
||||
|
||||
logger->info("Restart instance: config={}", cfg);
|
||||
|
||||
ret = execvp("/proc/self/exe", (char **) argv);
|
||||
if (ret)
|
||||
throw SystemError("Failed to restart");
|
||||
|
@ -53,6 +54,7 @@ protected:
|
|||
|
||||
public:
|
||||
using Action::Action;
|
||||
|
||||
virtual int execute(json_t *args, json_t **resp)
|
||||
{
|
||||
int ret;
|
||||
|
|
|
@ -33,6 +33,7 @@ class ShutdownAction : public Action {
|
|||
|
||||
public:
|
||||
using Action::Action;
|
||||
|
||||
virtual int execute(json_t *args, json_t **resp)
|
||||
{
|
||||
killme(SIGTERM);
|
||||
|
|
|
@ -34,6 +34,7 @@ class StatusAction : public Action {
|
|||
|
||||
public:
|
||||
using Action::Action;
|
||||
|
||||
virtual int execute(json_t *args, json_t **resp)
|
||||
{
|
||||
int ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue