mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
node: do not show warnings twice
This commit is contained in:
parent
cdcdb65c1b
commit
d29594858a
1 changed files with 2 additions and 11 deletions
13
lib/node.c
13
lib/node.c
|
@ -614,12 +614,8 @@ int node_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *re
|
|||
while (cnt - nsent > 0) {
|
||||
tosend = MIN(cnt - nsent, node_type(n)->vectorize);
|
||||
sent = node_type(n)->write(n, &smps[nsent], tosend, release);
|
||||
if (sent < 0) {
|
||||
warning("Failed to send samples to node %s: reason=%d", node_name(n), sent);
|
||||
if (sent < 0)
|
||||
return sent;
|
||||
}
|
||||
else if (sent < tosend)
|
||||
warning("Failed to send %d out of %d samples to node %s", tosend-sent, tosend, node_name(n));
|
||||
|
||||
nsent += sent;
|
||||
debug(LOG_NODE | 5, "Sent %u samples to node %s", sent, node_name(n));
|
||||
|
@ -627,13 +623,8 @@ int node_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *re
|
|||
}
|
||||
else {
|
||||
nsent = node_type(n)->write(n, smps, cnt, release);
|
||||
if (nsent < 0) {
|
||||
warning("Failed to send samples to node %s: reason=%d", node_name(n), nsent);
|
||||
if (nsent < 0)
|
||||
return nsent;
|
||||
}
|
||||
else if (nsent < cnt)
|
||||
warning("Failed to send %d out of %d samples to node %s", cnt-nsent, cnt, node_name(n));
|
||||
|
||||
|
||||
debug(LOG_NODE | 5, "Sent %u samples to node %s", nsent, node_name(n));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue