diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-10-23 16:12:31 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-10-23 16:12:31 +0000 |
commit | 52ec106d5a0e4c32ad608f7b7484f07590a46731 (patch) | |
tree | e742924a49d4600dd555a0a5ad0d1c871e3a0f5a /regress/usr.sbin/rpki-client | |
parent | fb5c5e7124c3fa6afbb62d7873369c2200f4b44a (diff) |
Fixup test-http.c after big io change before anton@ complains
Diffstat (limited to 'regress/usr.sbin/rpki-client')
-rw-r--r-- | regress/usr.sbin/rpki-client/test-http.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/regress/usr.sbin/rpki-client/test-http.c b/regress/usr.sbin/rpki-client/test-http.c index fa009cc35c3..78565883131 100644 --- a/regress/usr.sbin/rpki-client/test-http.c +++ b/regress/usr.sbin/rpki-client/test-http.c @@ -57,14 +57,18 @@ http_result(enum http_result res) static int http_response(int fd) { - size_t id, sz; + struct ibuf *b, *httpbuf = NULL; + size_t id; enum http_result res; char *lastmod; - io_simple_read(fd, &sz, sizeof(sz)); - io_simple_read(fd, &id, sizeof(id)); - io_simple_read(fd, &res, sizeof(res)); - io_str_read(fd, &lastmod); + while ((b = io_buf_read(fd, &httpbuf)) == NULL) + /* nothing */ ; + + io_read_buf(b, &id, sizeof(id)); + io_read_buf(b, &res, sizeof(res)); + io_read_str(b, &lastmod); + ibuf_free(b); printf("transfer %s", http_result(res)); if (lastmod) |