mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fixed debug output: incorrect number of released samples
This commit is contained in:
parent
b9d5bccb57
commit
8240bf52c9
1 changed files with 4 additions and 2 deletions
|
@ -100,8 +100,10 @@ static void path_write(struct path *p)
|
|||
debug(DBG_PATH | 15, "Sent %u messages to node %s", sent, node_name(pd->node));
|
||||
|
||||
released = 0;
|
||||
for (int i = 0; i < sent; i++)
|
||||
released += sample_put(smps[i]);
|
||||
for (int i = 0; i < sent; i++) {
|
||||
if (sample_put(smps[i]) == 0)
|
||||
released++; /* we had the last reference (0 remaining) */
|
||||
}
|
||||
|
||||
debug(DBG_PATH | 15, "Released %d samples back to memory pool", released);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue