summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-08-20 13:31:50 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-08-20 13:31:50 +0000
commit31e5aa5a9751a3d0313afe7cd0b1b7fda645d4ee (patch)
treeba4395dc05e49db02b589af4a055713f223de7b2 /usr.sbin/rpki-client
parentd7b2a55d7d128d59b9092575d9ca3ba5ccfaf472 (diff)
Use msgbuf_queuelen() instead of accessing the queued member directly.
OK tb@
Diffstat (limited to 'usr.sbin/rpki-client')
-rw-r--r--usr.sbin/rpki-client/filemode.c4
-rw-r--r--usr.sbin/rpki-client/http.c4
-rw-r--r--usr.sbin/rpki-client/main.c4
-rw-r--r--usr.sbin/rpki-client/parser.c4
-rw-r--r--usr.sbin/rpki-client/rrdp.c4
-rw-r--r--usr.sbin/rpki-client/rsync.c4
6 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/rpki-client/filemode.c b/usr.sbin/rpki-client/filemode.c
index 93eb7ef3ee2..ef77ac0070a 100644
--- a/usr.sbin/rpki-client/filemode.c
+++ b/usr.sbin/rpki-client/filemode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: filemode.c,v 1.48 2024/07/25 08:44:39 tb Exp $ */
+/* $OpenBSD: filemode.c,v 1.49 2024/08/20 13:31:49 claudio Exp $ */
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -731,7 +731,7 @@ proc_filemode(int fd)
for (;;) {
pfd.events = POLLIN;
- if (msgq.queued)
+ if (msgbuf_queuelen(&msgq) > 0)
pfd.events |= POLLOUT;
if (poll(&pfd, 1, INFTIM) == -1) {
diff --git a/usr.sbin/rpki-client/http.c b/usr.sbin/rpki-client/http.c
index 78ee91e5705..cf6772e1f6f 100644
--- a/usr.sbin/rpki-client/http.c
+++ b/usr.sbin/rpki-client/http.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: http.c,v 1.85 2024/04/23 10:27:46 tb Exp $ */
+/* $OpenBSD: http.c,v 1.86 2024/08/20 13:31:49 claudio Exp $ */
/*
* Copyright (c) 2020 Nils Fisher <nils_fisher@hotmail.com>
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
@@ -2077,7 +2077,7 @@ proc_http(char *bind_addr, int fd)
memset(&pfds, 0, sizeof(pfds));
pfds[0].fd = fd;
pfds[0].events = POLLIN;
- if (msgq.queued)
+ if (msgbuf_queuelen(&msgq) > 0)
pfds[0].events |= POLLOUT;
i = 1;
diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c
index da095f9cfea..7ff894915fa 100644
--- a/usr.sbin/rpki-client/main.c
+++ b/usr.sbin/rpki-client/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.263 2024/08/15 09:22:12 claudio Exp $ */
+/* $OpenBSD: main.c,v 1.264 2024/08/20 13:31:49 claudio Exp $ */
/*
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -1289,7 +1289,7 @@ main(int argc, char *argv[])
for (i = 0; i < NPFD; i++) {
pfd[i].events = POLLIN;
- if (queues[i]->queued)
+ if (msgbuf_queuelen(queues[i]) > 0)
pfd[i].events |= POLLOUT;
}
diff --git a/usr.sbin/rpki-client/parser.c b/usr.sbin/rpki-client/parser.c
index c11ec98fd25..7f58a46008c 100644
--- a/usr.sbin/rpki-client/parser.c
+++ b/usr.sbin/rpki-client/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.141 2024/06/12 10:03:09 tb Exp $ */
+/* $OpenBSD: parser.c,v 1.142 2024/08/20 13:31:49 claudio Exp $ */
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -1056,7 +1056,7 @@ proc_parser(int fd)
for (;;) {
pfd.events = POLLIN;
- if (msgq.queued)
+ if (msgbuf_queuelen(&msgq) > 0)
pfd.events |= POLLOUT;
if (poll(&pfd, 1, INFTIM) == -1) {
diff --git a/usr.sbin/rpki-client/rrdp.c b/usr.sbin/rpki-client/rrdp.c
index 8fae02e894c..bf348d951e2 100644
--- a/usr.sbin/rpki-client/rrdp.c
+++ b/usr.sbin/rpki-client/rrdp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rrdp.c,v 1.33 2024/02/16 11:46:57 tb Exp $ */
+/* $OpenBSD: rrdp.c,v 1.34 2024/08/20 13:31:49 claudio Exp $ */
/*
* Copyright (c) 2020 Nils Fisher <nils_fisher@hotmail.com>
* Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org>
@@ -585,7 +585,7 @@ proc_rrdp(int fd)
*/
pfds[0].fd = fd;
pfds[0].events = POLLIN;
- if (msgq.queued)
+ if (msgbuf_queuelen(&msgq) > 0)
pfds[0].events |= POLLOUT;
if (poll(pfds, i, INFTIM) == -1) {
diff --git a/usr.sbin/rpki-client/rsync.c b/usr.sbin/rpki-client/rsync.c
index 33fe81541b7..2a83b78bfea 100644
--- a/usr.sbin/rpki-client/rsync.c
+++ b/usr.sbin/rpki-client/rsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsync.c,v 1.50 2024/03/22 03:38:12 job Exp $ */
+/* $OpenBSD: rsync.c,v 1.51 2024/08/20 13:31:49 claudio Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -294,7 +294,7 @@ proc_rsync(char *prog, char *bind_addr, int fd)
pfd.events = 0;
pfd.events |= POLLIN;
- if (msgq.queued)
+ if (msgbuf_queuelen(&msgq) > 0)
pfd.events |= POLLOUT;
if (npending > 0 && nprocs < MAX_RSYNC_REQUESTS) {