diff --git a/lib/api/request.cpp b/lib/api/request.cpp index 3db96ef4f..81124152f 100644 --- a/lib/api/request.cpp +++ b/lib/api/request.cpp @@ -42,7 +42,7 @@ std::string Request::toString() Request * RequestFactory::create(Session *s, const std::string &uri, Session::Method meth, unsigned long ct) { - s->logger->info("Trying to find request handler for: uri={}", uri); + s->logger->info("Lookup request handler for: uri={}", uri); for (auto *rf : plugin::Registry::lookup()) { std::smatch mr; diff --git a/lib/format.cpp b/lib/format.cpp index 0072a53f3..27f4522f1 100644 --- a/lib/format.cpp +++ b/lib/format.cpp @@ -62,7 +62,7 @@ Format * FormatFactory::make(json_t *json) return f; } else - throw ConfigError(json, "Invalid format config"); + throw ConfigError(json, "node-config-format", "Invalid format config"); } Format * FormatFactory::make(const std::string &format) diff --git a/lib/nodes/file.cpp b/lib/nodes/file.cpp index 0917ac980..37d36987c 100644 --- a/lib/nodes/file.cpp +++ b/lib/nodes/file.cpp @@ -87,7 +87,7 @@ int file_parse(struct vnode *n, json_t *json) int ret; json_error_t err; - json_t *json_format; + json_t *json_format = nullptr; const char *uri_tmpl = nullptr; const char *eof = nullptr; diff --git a/lib/nodes/signal_generator.cpp b/lib/nodes/signal_generator.cpp index 981aaa750..8693b3c1e 100644 --- a/lib/nodes/signal_generator.cpp +++ b/lib/nodes/signal_generator.cpp @@ -352,7 +352,7 @@ int signal_generator_read(struct vnode *n, struct sample * const smps[], unsigne t->length = MIN(s->values, t->capacity); t->signals = &n->in.signals; - for (unsigned i = 0; i < MIN(s->values, t->capacity); i++) { + for (unsigned i = 0; i < t->length; i++) { switch (s->type[i]) { case signal_generator::SignalType::CONSTANT: t->data[i].f = s->offset[i] + s->amplitude[i]; diff --git a/src/villas-hook.cpp b/src/villas-hook.cpp index e5b7a5a39..a376d1bfb 100644 --- a/src/villas-hook.cpp +++ b/src/villas-hook.cpp @@ -107,18 +107,19 @@ protected: void usage() { - std::cout << "Usage: villas-hook [OPTIONS] NAME [[PARAM1] [PARAM2] ...]" << std::endl + std::cout << "Usage: villas-hook [OPTIONS] NAME" << std::endl << " NAME the name of the hook function" << std::endl << " PARAM* a string of configuration settings for the hook" << std::endl << " OPTIONS is one or more of the following options:" << std::endl - << " -c CONFIG a JSON file containing just the hook configuration" << std::endl - << " -f FMT the input data format" << std::endl - << " -F FMT the output data format (defaults to input format)" << std::endl - << " -t DT the data-type format string" << std::endl - << " -d LVL set debug level to LVL" << std::endl - << " -v CNT process CNT smps at once" << std::endl - << " -h show this help" << std::endl - << " -V show the version of the tool" << std::endl << std::endl; + << " -c CONFIG a JSON file containing just the hook configuration" << std::endl + << " -f FMT the input data format" << std::endl + << " -F FMT the output data format (defaults to input format)" << std::endl + << " -t DT the data-type format string" << std::endl + << " -d LVL set debug level to LVL" << std::endl + << " -v CNT process CNT smps at once" << std::endl + << " -o PARAM=VALUE provide parameters for hook configuration" << std::endl + << " -h show this help" << std::endl + << " -V show the version of the tool" << std::endl << std::endl; std::cout << "Supported hooks:" << std::endl; for (Plugin *p : Registry::lookup())