aboutsummaryrefslogtreecommitdiff
path: root/src/vpn
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-05-07 07:24:38 +0000
committerChristian Grothoff <christian@grothoff.org>2012-05-07 07:24:38 +0000
commit968fcecb4701064fd37d8e3350888be94c9d5b67 (patch)
treefffe7ccdfe5171953ad5f4c472d39794ce05fc99 /src/vpn
parentee496fc845133fdaf20d98105a0f324bcccb1ff5 (diff)
downloadgnunet-968fcecb4701064fd37d8e3350888be94c9d5b67.tar.gz
gnunet-968fcecb4701064fd37d8e3350888be94c9d5b67.zip
-avoid #ifdef, limit to tcp to avoid importing bugs from transport into vpn tests
Diffstat (limited to 'src/vpn')
-rw-r--r--src/vpn/test_gnunet_vpn.c22
-rw-r--r--src/vpn/test_gnunet_vpn.conf2
2 files changed, 5 insertions, 19 deletions
diff --git a/src/vpn/test_gnunet_vpn.c b/src/vpn/test_gnunet_vpn.c
index f61bae102..52e2f3fa2 100644
--- a/src/vpn/test_gnunet_vpn.c
+++ b/src/vpn/test_gnunet_vpn.c
@@ -131,9 +131,7 @@ mhd_ahc (void *cls,
131 return MHD_YES; 131 return MHD_YES;
132 } 132 }
133 *unused = NULL; 133 *unused = NULL;
134#if VERBOSE 134 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MHD sends respose for request to URL `%s'\n", url);
135 fprintf (stderr, "MHD sends respose for request to URL `%s'\n", url);
136#endif
137 response = MHD_create_response_from_buffer (strlen (url), 135 response = MHD_create_response_from_buffer (strlen (url),
138 (void *) url, 136 (void *) url,
139 MHD_RESPMEM_MUST_COPY); 137 MHD_RESPMEM_MUST_COPY);
@@ -248,9 +246,7 @@ curl_main ()
248 GNUNET_break (0); 246 GNUNET_break (0);
249 global_ret = 3; 247 global_ret = 3;
250 } 248 }
251#if VERBOSE 249 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Download complete, shutting down!\n");
252 fprintf (stderr, "Download complete, shutting down!\n");
253#endif
254 do_shutdown (); 250 do_shutdown ();
255 return; 251 return;
256 } 252 }
@@ -319,9 +315,7 @@ allocation_cb (void *cls,
319 multi = curl_multi_init (); 315 multi = curl_multi_init ();
320 GNUNET_assert (multi != NULL); 316 GNUNET_assert (multi != NULL);
321 GNUNET_assert (CURLM_OK == curl_multi_add_handle (multi, curl)); 317 GNUNET_assert (CURLM_OK == curl_multi_add_handle (multi, curl));
322#if VERBOSE 318 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Beginning HTTP download from `%s'\n", url);
323 fprintf (stderr, "Beginning HTTP download from `%s'\n", url);
324#endif
325 curl_main (); 319 curl_main ();
326} 320}
327 321
@@ -449,9 +443,6 @@ setup_peer (struct PeerContext *p, const char *cfgname)
449 p->arm_proc = 443 p->arm_proc =
450 GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm", 444 GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm",
451 "gnunet-service-arm", 445 "gnunet-service-arm",
452#if VERBOSE
453 "-L", "DEBUG",
454#endif
455 "-c", cfgname, NULL); 446 "-c", cfgname, NULL);
456#endif 447#endif
457 GNUNET_assert (NULL != p->arm_proc); 448 GNUNET_assert (NULL != p->arm_proc);
@@ -513,9 +504,6 @@ main (int argc, char *const *argv)
513 "test_gnunet_vpn", 504 "test_gnunet_vpn",
514 "-c", 505 "-c",
515 "test_gnunet_vpn.conf", 506 "test_gnunet_vpn.conf",
516#if VERBOSE
517 "-L", "DEBUG",
518#endif
519 NULL 507 NULL
520 }; 508 };
521 struct GNUNET_GETOPT_CommandLineOption options[] = { 509 struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -598,11 +586,7 @@ main (int argc, char *const *argv)
598 } 586 }
599 setup_peer (&p1, "test_gnunet_vpn.conf"); 587 setup_peer (&p1, "test_gnunet_vpn.conf");
600 GNUNET_log_setup ("test_gnunet_vpn", 588 GNUNET_log_setup ("test_gnunet_vpn",
601#if VERBOSE
602 "DEBUG",
603#else
604 "WARNING", 589 "WARNING",
605#endif
606 NULL); 590 NULL);
607 GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1, argvx, 591 GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1, argvx,
608 "test_gnunet_vpn", "nohelp", options, &run, NULL); 592 "test_gnunet_vpn", "nohelp", options, &run, NULL);
diff --git a/src/vpn/test_gnunet_vpn.conf b/src/vpn/test_gnunet_vpn.conf
index 6818fa726..bdac1a5b6 100644
--- a/src/vpn/test_gnunet_vpn.conf
+++ b/src/vpn/test_gnunet_vpn.conf
@@ -2,6 +2,8 @@
2SERVICEHOME = /tmp/gnunet-test-vpn/ 2SERVICEHOME = /tmp/gnunet-test-vpn/
3DEFAULTCONFIG = test_gnunet_vpn.conf 3DEFAULTCONFIG = test_gnunet_vpn.conf
4 4
5[transport]
6PLUGINS = tcp
5 7
6[arm] 8[arm]
7DEFAULTSERVICES = statistics exit vpn 9DEFAULTSERVICES = statistics exit vpn