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:
parent
d40e3cd06f
commit
858dfdd35a
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue