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

mark samples with source node

This commit is contained in:
Steffen Vogel 2016-11-07 22:20:09 -05:00
parent 9e13b06a59
commit 15e7e78e04
2 changed files with 4 additions and 0 deletions

View file

@ -45,6 +45,7 @@ struct sample {
atomic_int refcnt; /**< Reference counter. */
struct pool *pool; /**< This sample is belong to this memory pool. */
struct node *source; /**< The node from which this sample originates. */
/** All timestamps are seconds / nano seconds after 1.1.1970 UTC */
struct {

View file

@ -38,6 +38,9 @@ int node_read(struct node *n, struct sample *smps[], unsigned cnt)
nread = n->_vt->read(n, smps, cnt);
}
for (int i = 0; i < nread; i++)
smps[i]->source = n;
return nread;
}