1
0
Fork 0
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:
Steffen Vogel 2016-11-20 03:44:51 -05:00
parent b9d5bccb57
commit 8240bf52c9

View file

@ -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);
}