diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-05-26 15:23:33 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-05-26 15:23:33 +0000 |
commit | dae4222c75b4879cf1524d4dc93bb6f023f468ca (patch) | |
tree | 73d9c5fb8009b8351d66e8b7f5a7093e7b202fd5 /src/pt | |
parent | 98400554f939e0b318bdfd4c80fd13e7c89128d6 (diff) | |
download | gnunet-dae4222c75b4879cf1524d4dc93bb6f023f468ca.tar.gz gnunet-dae4222c75b4879cf1524d4dc93bb6f023f468ca.zip |
-indentation
Diffstat (limited to 'src/pt')
-rw-r--r-- | src/pt/test_gnunet_vpn.c | 17 |
1 files changed, 13 insertions, 4 deletions
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) | |||
270 | GNUNET_SCHEDULER_shutdown (); | 270 | GNUNET_SCHEDULER_shutdown (); |
271 | return; | 271 | return; |
272 | } | 272 | } |
273 | GNUNET_asprintf (&url, "http://%s:%u/hello_world", | 273 | if (AF_INET6 == af) |
274 | inet_ntop (af, address, ips, sizeof (ips)), | 274 | GNUNET_asprintf (&url, |
275 | (unsigned int) PORT); | 275 | "http://[%s]:%u/hello_world", |
276 | inet_ntop (af, address, ips, sizeof (ips)), | ||
277 | (unsigned int) PORT); | ||
278 | else | ||
279 | GNUNET_asprintf (&url, | ||
280 | "http://%s:%u/hello_world", | ||
281 | inet_ntop (af, address, ips, sizeof (ips)), | ||
282 | (unsigned int) PORT); | ||
276 | curl = curl_easy_init (); | 283 | curl = curl_easy_init (); |
277 | curl_easy_setopt (curl, CURLOPT_URL, url); | 284 | curl_easy_setopt (curl, CURLOPT_URL, url); |
278 | curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, ©_buffer); | 285 | curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, ©_buffer); |
@@ -281,11 +288,13 @@ allocation_cb (void *cls, int af, const void *address) | |||
281 | curl_easy_setopt (curl, CURLOPT_TIMEOUT, 150L); | 288 | curl_easy_setopt (curl, CURLOPT_TIMEOUT, 150L); |
282 | curl_easy_setopt (curl, CURLOPT_CONNECTTIMEOUT, 15L); | 289 | curl_easy_setopt (curl, CURLOPT_CONNECTTIMEOUT, 15L); |
283 | curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1); | 290 | curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1); |
291 | curl_easy_setopt (curl, CURLOPT_VERBOSE, 1); | ||
284 | 292 | ||
285 | multi = curl_multi_init (); | 293 | multi = curl_multi_init (); |
286 | GNUNET_assert (multi != NULL); | 294 | GNUNET_assert (multi != NULL); |
287 | GNUNET_assert (CURLM_OK == curl_multi_add_handle (multi, curl)); | 295 | GNUNET_assert (CURLM_OK == curl_multi_add_handle (multi, curl)); |
288 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Beginning HTTP download from `%s'\n", | 296 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
297 | "Beginning HTTP download from `%s'\n", | ||
289 | url); | 298 | url); |
290 | curl_main (); | 299 | curl_main (); |
291 | } | 300 | } |