From 11d1786d9d620ea801a0d2f44b57dfcd3a6d3d5a Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 15 Oct 2020 13:13:04 +0200 Subject: [PATCH] super_node: remove name setting --- include/villas/super_node.hpp | 6 ------ lib/super_node.cpp | 12 +----------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/include/villas/super_node.hpp b/include/villas/super_node.hpp index 9ccda1c2d..b5613ad78 100644 --- a/include/villas/super_node.hpp +++ b/include/villas/super_node.hpp @@ -78,7 +78,6 @@ protected: struct Task task; /**< Task for periodic stats output */ - std::string name; /**< A name of this super node. Usually the hostname. */ std::string uri; /**< URI of configuration */ Config config; /** The configuration file. */ @@ -181,11 +180,6 @@ public: return uri; } - std::string getName() const - { - return name; - } - int getAffinity() const { return affinity; diff --git a/lib/super_node.cpp b/lib/super_node.cpp index 34f2aae13..b7e4bc93c 100644 --- a/lib/super_node.cpp +++ b/lib/super_node.cpp @@ -79,11 +79,6 @@ SuperNode::SuperNode() : kernel::nl::init(); /* Fill link cache */ #endif /* WITH_NETEM */ - char hname[128]; - gethostname(hname, 128); - - name = hname; - logger = logging.get("super_node"); } @@ -97,7 +92,6 @@ void SuperNode::parse(const std::string &u) void SuperNode::parse(json_t *root) { int ret; - const char *nme = nullptr; assert(state != State::STARTED); @@ -108,7 +102,7 @@ void SuperNode::parse(json_t *root) json_error_t err; - ret = json_unpack_ex(root, &err, 0, "{ s?: F, s?: o, s?: o, s?: o, s?: o, s?: i, s?: i, s?: i, s?: s, s?: b }", + ret = json_unpack_ex(root, &err, 0, "{ s?: F, s?: o, s?: o, s?: o, s?: o, s?: i, s?: i, s?: i, s?: b }", "stats", &statsRate, "http", &json_http, "logging", &json_logging, @@ -117,15 +111,11 @@ void SuperNode::parse(json_t *root) "hugepages", &hugepages, "affinity", &affinity, "priority", &priority, - "name", &nme, "idle_stop", &idleStop ); if (ret) throw ConfigError(root, err, "node-config", "Unpacking top-level config failed"); - if (nme) - name = nme; - #ifdef WITH_WEB if (json_http) web.parse(json_http);