From dae4222c75b4879cf1524d4dc93bb6f023f468ca Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 26 May 2015 15:23:33 +0000 Subject: -indentation --- src/pt/test_gnunet_vpn.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/pt/test_gnunet_vpn.c') diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c index ef22fa404..3f252cb46 100644 --- a/src/pt/test_gnunet_vpn.c +++ b/src/pt/test_gnunet_vpn.c @@ -270,9 +270,16 @@ allocation_cb (void *cls, int af, const void *address) GNUNET_SCHEDULER_shutdown (); return; } - GNUNET_asprintf (&url, "http://%s:%u/hello_world", - inet_ntop (af, address, ips, sizeof (ips)), - (unsigned int) PORT); + if (AF_INET6 == af) + GNUNET_asprintf (&url, + "http://[%s]:%u/hello_world", + inet_ntop (af, address, ips, sizeof (ips)), + (unsigned int) PORT); + else + GNUNET_asprintf (&url, + "http://%s:%u/hello_world", + inet_ntop (af, address, ips, sizeof (ips)), + (unsigned int) PORT); curl = curl_easy_init (); curl_easy_setopt (curl, CURLOPT_URL, url); curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, ©_buffer); @@ -281,11 +288,13 @@ allocation_cb (void *cls, int af, const void *address) curl_easy_setopt (curl, CURLOPT_TIMEOUT, 150L); curl_easy_setopt (curl, CURLOPT_CONNECTTIMEOUT, 15L); curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1); + curl_easy_setopt (curl, CURLOPT_VERBOSE, 1); multi = curl_multi_init (); GNUNET_assert (multi != NULL); GNUNET_assert (CURLM_OK == curl_multi_add_handle (multi, curl)); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Beginning HTTP download from `%s'\n", + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Beginning HTTP download from `%s'\n", url); curl_main (); } -- cgit v1.2.3