mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix changes to villas-hook
This commit is contained in:
parent
0e86d41267
commit
3ae112095d
1 changed files with 7 additions and 6 deletions
|
@ -222,12 +222,8 @@ 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;
|
||||
}
|
||||
|
||||
timespec now = time_now();
|
||||
|
||||
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:
|
||||
|
|
Loading…
Add table
Reference in a new issue