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:
parent
9e13b06a59
commit
15e7e78e04
2 changed files with 4 additions and 0 deletions
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue