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

fix changes to villas-hook

This commit is contained in:
Steffen Vogel 2019-05-24 10:51:10 +02:00
parent 0e86d41267
commit 3ae112095d

View file

@ -223,11 +223,7 @@ check: if (optarg == endptr)
throw RuntimeError("Failed to read from stdin");
}
if (!(smp->flags & SAMPLE_HAS_TS_RECEIVED)){
timespec now = time_now();
smp->ts.received = now;
smp->flags |= SAMPLE_HAS_TS_RECEIVED;
}
logger->debug("Read {} smps from stdin", recv);
@ -235,6 +231,11 @@ check: if (optarg == endptr)
for (int processed = 0; processed < recv; processed++) {
struct sample *smp = smps[processed];
if (!(smp->flags & SAMPLE_HAS_TS_RECEIVED)){
smp->ts.received = now;
smp->flags |= SAMPLE_HAS_TS_RECEIVED;
}
ret = h->process(smp);
switch (ret) {
case HOOK_ERROR: