diff options
author | Azat Khuzhin <a3at.mail@gmail.com> | 2014-03-27 00:44:51 +0400 |
---|---|---|
committer | Azat Khuzhin <a3at.mail@gmail.com> | 2014-03-27 00:49:58 +0400 |
commit | 177b8a7ce8b99253f9bbe27bdda177462296ee6b (patch) | |
tree | 51565ff9261367046855764c71f0d526ce0c06e2 | |
parent | 12c29b0f6eb55cfc096276f3ad808248cee6ff76 (diff) | |
download | libevent-177b8a7ce8b99253f9bbe27bdda177462296ee6b.tar.gz |
test: add family argument for http_connection_test_()
-rw-r--r-- | test/regress_http.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/regress_http.c b/test/regress_http.c index faebabc4..aa384917 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -858,7 +858,8 @@ static void http_request_done(struct evhttp_request *, void *); static void http_request_empty_done(struct evhttp_request *, void *); static void -http_connection_test_(struct basic_test_data *data, int persistent, const char *address, struct evdns_base *dnsbase, int ipv6) +http_connection_test_(struct basic_test_data *data, int persistent, + const char *address, struct evdns_base *dnsbase, int ipv6, int family) { ev_uint16_t port = 0; struct evhttp_connection *evcon = NULL; @@ -870,6 +871,7 @@ http_connection_test_(struct basic_test_data *data, int persistent, const char * evcon = evhttp_connection_base_new(data->base, dnsbase, address, port); tt_assert(evcon); + evhttp_connection_set_family(evcon, family); tt_assert(evhttp_connection_get_base(evcon) == data->base); @@ -943,12 +945,12 @@ http_connection_test_(struct basic_test_data *data, int persistent, const char * static void http_connection_test(void *arg) { - http_connection_test_(arg, 0, "127.0.0.1", NULL, 0); + http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC); } static void http_persist_connection_test(void *arg) { - http_connection_test_(arg, 1, "127.0.0.1", NULL, 0); + http_connection_test_(arg, 1, "127.0.0.1", NULL, 0, AF_UNSPEC); } static struct regress_dns_server_table search_table[] = { @@ -3656,7 +3658,8 @@ http_ipv6_for_domain_test(void *arg) evutil_snprintf(address, sizeof(address), "127.0.0.1:%d", portnum); evdns_base_nameserver_ip_add(dns_base, address); - http_connection_test_(arg, 0 /* not persistent */, "localhost", dns_base, 1 /* ipv6 */); + http_connection_test_(arg, 0 /* not persistent */, "localhost", dns_base, + 1 /* ipv6 */, AF_UNSPEC); end: if (dns_base) |