diff --git a/include/villas/node.h b/include/villas/node.h index 75ed11670..1616d7084 100644 --- a/include/villas/node.h +++ b/include/villas/node.h @@ -103,7 +103,7 @@ struct node { int node_init(struct node *n, struct node_type *vt); /** Do initialization after parsing the configuration */ -int node_init2(struct node *n); +int node_prepare(struct node *n); /** Parse settings of a node. * diff --git a/include/villas/path.h b/include/villas/path.h index 622c263a3..6024139c3 100644 --- a/include/villas/path.h +++ b/include/villas/path.h @@ -112,7 +112,7 @@ struct path { /** Initialize internal data structures. */ int path_init(struct path *p); -int path_init2(struct path *p); +int path_prepare(struct path *p); /** Check if path configuration is proper. */ int path_check(struct path *p); diff --git a/lib/node.c b/lib/node.c index cec2e5b3a..b85beffbb 100644 --- a/lib/node.c +++ b/lib/node.c @@ -41,7 +41,7 @@ #include #endif /* WITH_NETEM */ -static int node_direction_init2(struct node_direction *nd, struct node *n) +int node_direction_prepare(struct node_direction *nd, struct node *n) { #ifdef WITH_HOOKS int ret; @@ -254,17 +254,17 @@ int node_init(struct node *n, struct node_type *vt) return 0; } -int node_init2(struct node *n) +int node_prepare(struct node *n) { int ret; assert(n->state == STATE_CHECKED); - ret = node_direction_init2(&n->in, n); + ret = node_direction_prepare(&n->in, n); if (ret) return ret; - ret = node_direction_init2(&n->out, n); + ret = node_direction_prepare(&n->in, n); if (ret) return ret; diff --git a/lib/path.c b/lib/path.c index 97528c938..8365d266b 100644 --- a/lib/path.c +++ b/lib/path.c @@ -404,7 +404,7 @@ int path_init_poll(struct path *p) return 0; } -int path_init2(struct path *p) +int path_prepare(struct path *p) { int ret; diff --git a/lib/super_node.cpp b/lib/super_node.cpp index 180636f27..de842388e 100644 --- a/lib/super_node.cpp +++ b/lib/super_node.cpp @@ -356,7 +356,7 @@ void SuperNode::startNodes() for (size_t i = 0; i < vlist_length(&nodes); i++) { auto *n = (struct node *) vlist_at(&nodes, i); - ret = node_init2(n); + ret = node_prepare(n); if (ret) throw RuntimeError("Failed to prepare node: {}", node_name(n)); @@ -379,7 +379,7 @@ void SuperNode::startPaths() auto *p = (struct path *) vlist_at(&paths, i); if (p->enabled) { - ret = path_init2(p); + ret = path_prepare(p); if (ret) throw RuntimeError("Failed to prepare path: {}", path_name(p)); diff --git a/src/villas-pipe.cpp b/src/villas-pipe.cpp index 51df16d56..0d679656f 100644 --- a/src/villas-pipe.cpp +++ b/src/villas-pipe.cpp @@ -395,7 +395,7 @@ check: if (optarg == endptr) if (ret) throw RuntimeError("Invalid node configuration"); - ret = node_init2(node); + ret = node_prepare(node); if (ret) throw RuntimeError("Failed to start node {}: reason={}", node_name(node), ret); diff --git a/src/villas-signal.cpp b/src/villas-signal.cpp index 594b2cdb0..4040cf7b6 100644 --- a/src/villas-signal.cpp +++ b/src/villas-signal.cpp @@ -237,7 +237,7 @@ int main(int argc, char *argv[]) if (ret) throw RuntimeError("Failed to initialize pool"); - ret = node_init2(&n); + ret = node_prepare(&n); if (ret) throw RuntimeError("Failed to start node {}: reason={}", node_name(&n), ret); diff --git a/src/villas-test-rtt.cpp b/src/villas-test-rtt.cpp index 8ae798a2c..8c6c1812f 100644 --- a/src/villas-test-rtt.cpp +++ b/src/villas-test-rtt.cpp @@ -167,7 +167,7 @@ check: if (optarg == endptr) if (ret) throw RuntimeError("Failed to start node-type {}: reason={}", node_type_name(node->_vt), ret); - ret = node_init2(node); + ret = node_prepare(node); if (ret) throw RuntimeError("Failed to start node {}: reason={}", node_name(node), ret);