From: claudio Date: Sat, 23 Oct 2021 16:12:30 +0000 (+0000) Subject: Fixup test-http.c after big io change before anton@ complains X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=73cfe019b687b1affe31defabd0e6cf962ea362f;p=openbsd Fixup test-http.c after big io change before anton@ complains --- 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)