1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

villas-hook: correctly initialise hook_info

This commit is contained in:
Steffen Vogel 2017-03-14 11:18:49 -03:00
parent d40e3cd06f
commit 858dfdd35a

View file

@ -43,12 +43,12 @@ int main(int argc, char *argv[])
char *name, *parameter;
struct sample *samples[cnt];
struct log log;
struct pool pool = { .state = STATE_DESTROYED };
struct hook_info hi;
struct hook_info hi = { .smps = samples };
struct plugin *p;
struct hook *h;
struct sample *samples[cnt];
char c;
while ((c = getopt(argc, argv, "hv:d:")) != -1) {
@ -95,7 +95,6 @@ int main(int argc, char *argv[])
error("Failed to allocate %u samples from pool", cnt);
h->parameter = parameter;
hi.smps = samples;
if (h->type & HOOK_INIT)
h->cb(h, HOOK_INIT, &hi);