Mercurial > hg > dhcpcd
changeset 5284:2b5f56e079b0 draft
route: improve overflow logging
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Sat, 30 May 2020 14:01:47 +0000 |
| parents | 87cdd74ea98e |
| children | 7754eb6cd2eb |
| files | src/dhcpcd.c |
| diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dhcpcd.c Sat May 30 14:54:31 2020 +0100 +++ b/src/dhcpcd.c Sat May 30 14:01:47 2020 +0000 @@ -1189,12 +1189,10 @@ rcnt = 0; do { rlen = read(ctx->link_fd, buf, sizeof(buf)); - if (++rcnt == 100) { + if (++rcnt % 1000 == 0) logwarnx("drained %zu messages", rcnt); - rcnt = 0; - } } while (rlen != -1 || errno == ENOBUFS || errno == ENOMEM); - if (rcnt != 100) + if (rcnt % 1000 != 0) logwarnx("drained %zu messages", rcnt); /* Work out the current interfaces. */
