From 6a1c4d501b421a01d1b057b89ad51567ebed6338 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 18 Mar 2014 18:36:32 -0400 Subject: [PATCH] Correctly skip ipv6 http test on systems without ipv6 --- test/regress_http.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/regress_http.c b/test/regress_http.c index 0de22565..5658135f 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -105,8 +105,12 @@ http_bind(struct evhttp *myhttp, ev_uint16_t *pport, int ipv6) else sock = evhttp_bind_socket_with_handle(myhttp, "127.0.0.1", *pport); - if (sock == NULL) - event_errx(1, "Could not start web server"); + if (sock == NULL) { + if (ipv6) + return -1; + else + event_errx(1, "Could not start web server"); + } port = regress_get_socket_port(evhttp_bound_socket_get_fd(sock)); if (port < 0) -- 2.40.0