summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/httpserver.c2
-rw-r--r--tests/resolv.c22
2 files changed, 12 insertions, 12 deletions
diff --git a/tests/httpserver.c b/tests/httpserver.c
index a62bae25..bbdd8423 100644
--- a/tests/httpserver.c
+++ b/tests/httpserver.c
@@ -200,7 +200,7 @@ TestMain("HTTP Server", {
nng_aio_wait(aio);
So(nng_aio_result(aio) == 0);
- h = nni_aio_get_output(aio, 0);
+ h = nng_aio_get_output(aio, 0);
So(h != NULL);
So(nng_http_req_alloc(&req, url) == 0);
So(nng_http_res_alloc(&res) == 0);
diff --git a/tests/resolv.c b/tests/resolv.c
index 607b3b11..9d83e6df 100644
--- a/tests/resolv.c
+++ b/tests/resolv.c
@@ -52,20 +52,20 @@ ip6tostr(void *addr)
// the normal assumptions on Linux do *not* hold true.
#if 0
Convey("Localhost IPv6 resolves", {
- nni_aio aio;
- memset(&aio, 0, sizeof (aio));
+ nng_aio *aio;
const char *str;
- nni_aio_init(&aio, NULL, NULL);
+ nng_sockaddr sa;
+ So(nng_aio_alloc(&aio, NULL, NULL) == 0);
+ So(nng_aio_set_input(aio, 0, &sa) == 0);
nni_plat_tcp_resolv("localhost", "80", NNG_AF_INET6, 1,
- &aio);
- nni_aio_wait(&aio);
- So(nni_aio_result(&aio) == 0);
- So(aio.a_naddrs == 1);
- So(aio.a_addrs[0].s_un.s_in6.sa_family == NNG_AF_INET6);
- So(aio.a_addrs[0].s_un.s_in6.sa_port == ntohs(80));
- str = ip6tostr(&aio.a_addrs[0].s_un.s_in6.sa_addr);
+ aio);
+ nng_aio_wait(aio);
+ So(nng_aio_result(aio) == 0);
+ So(sa.s_un.s_in6.sa_family == NNG_AF_INET6);
+ So(sa.s_un.s_in6.sa_port == ntohs(80));
+ str = ip6tostr(&sa.s_un.s_in6.sa_addr);
So(strcmp(str, "::1") == 0);
- nni_aio_fini(&aio);
+ nng_aio_free(aio);
}
#endif