aboutsummaryrefslogtreecommitdiff
path: root/src/vpn
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-04-24 13:22:23 +0000
committerChristian Grothoff <christian@grothoff.org>2012-04-24 13:22:23 +0000
commit42c30b1692fb9e979def91c52a6da61c00e6fc77 (patch)
tree10f244caeefd85f419185fa6ba9fe0070d29cee2 /src/vpn
parentc7d9dd68323bf87df84f84955efdea88f330faad (diff)
downloadgnunet-42c30b1692fb9e979def91c52a6da61c00e6fc77.tar.gz
gnunet-42c30b1692fb9e979def91c52a6da61c00e6fc77.zip
-better error reporting
Diffstat (limited to 'src/vpn')
-rw-r--r--src/vpn/test_gnunet_vpn.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/vpn/test_gnunet_vpn.c b/src/vpn/test_gnunet_vpn.c
index 7fcbe8b9e..4953e2410 100644
--- a/src/vpn/test_gnunet_vpn.c
+++ b/src/vpn/test_gnunet_vpn.c
@@ -225,8 +225,9 @@ curl_main ()
225 { 225 {
226 if (msg->data.result != CURLE_OK) 226 if (msg->data.result != CURLE_OK)
227 { 227 {
228 printf ("%s failed at %s:%d: `%s'\n", 228 fprintf (stderr,
229 "curl_multi_perform", 229 "%s failed at %s:%d: `%s'\n",
230 "curl_multi_perform",
230 __FILE__, 231 __FILE__,
231 __LINE__, curl_easy_strerror (msg->data.result)); 232 __LINE__, curl_easy_strerror (msg->data.result));
232 global_ret = 1; 233 global_ret = 1;
@@ -238,9 +239,15 @@ curl_main ()
238 curl = NULL; 239 curl = NULL;
239 multi = NULL; 240 multi = NULL;
240 if (cbc.pos != strlen ("/hello_world")) 241 if (cbc.pos != strlen ("/hello_world"))
242 {
243 GNUNET_break (0);
241 global_ret = 2; 244 global_ret = 2;
245 }
242 if (0 != strncmp ("/hello_world", cbc.buf, strlen ("/hello_world"))) 246 if (0 != strncmp ("/hello_world", cbc.buf, strlen ("/hello_world")))
247 {
248 GNUNET_break (0);
243 global_ret = 3; 249 global_ret = 3;
250 }
244#if VERBOSE 251#if VERBOSE
245 fprintf (stderr, "Download complete, shutting down!\n"); 252 fprintf (stderr, "Download complete, shutting down!\n");
246#endif 253#endif
@@ -342,6 +349,7 @@ ctrl_c_shutdown (void *cls,
342{ 349{
343 ctrl_c_task_id = GNUNET_SCHEDULER_NO_TASK; 350 ctrl_c_task_id = GNUNET_SCHEDULER_NO_TASK;
344 do_shutdown (); 351 do_shutdown ();
352 GNUNET_break (0);
345 global_ret = 1; 353 global_ret = 1;
346} 354}
347 355
@@ -584,7 +592,10 @@ main (int argc, char *const *argv)
584 592
585 593
586 if (0 != curl_global_init (CURL_GLOBAL_WIN32)) 594 if (0 != curl_global_init (CURL_GLOBAL_WIN32))
595 {
596 fprintf (stderr, "failed to initialize curl\n");
587 return 2; 597 return 2;
598 }
588 setup_peer (&p1, "test_gnunet_vpn.conf"); 599 setup_peer (&p1, "test_gnunet_vpn.conf");
589 GNUNET_log_setup ("test_gnunet_vpn", 600 GNUNET_log_setup ("test_gnunet_vpn",
590#if VERBOSE 601#if VERBOSE