aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-06-14 14:47:11 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-06-14 14:47:11 +0000
commit90a4c9922ef5fe5d15b832598449de8663b110bb (patch)
tree21b83fbb727fa7018a934db11f0fc878f05e4581 /src
parent665f48ee657c358621bcd5cf571ce96d6922eb3e (diff)
downloadgnunet-90a4c9922ef5fe5d15b832598449de8663b110bb.tar.gz
gnunet-90a4c9922ef5fe5d15b832598449de8663b110bb.zip
Diffstat (limited to 'src')
-rw-r--r--src/transport/test_plugin_transport_http.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/transport/test_plugin_transport_http.c b/src/transport/test_plugin_transport_http.c
index 5540e7fae..efeaab9a1 100644
--- a/src/transport/test_plugin_transport_http.c
+++ b/src/transport/test_plugin_transport_http.c
@@ -295,9 +295,9 @@ static int fail_pretty_printer_count;
295static int fail_addr_to_str; 295static int fail_addr_to_str;
296 296
297/** 297/**
298 * Did the test pass or fail? 298 * No. of msgs transmitted successfully to local addresses
299 */ 299 */
300static int fail_transmit_to_local_addrs; 300static int fail_msgs_transmited_to_local_addrs;
301 301
302/** 302/**
303 * Test: connect to peer without peer identification 303 * Test: connect to peer without peer identification
@@ -353,7 +353,7 @@ shutdown_clean ()
353 /* Evaluate results */ 353 /* Evaluate results */
354 if ((fail_notify_address == GNUNET_NO) && (fail_pretty_printer == GNUNET_NO) && (fail_addr_to_str == GNUNET_NO) && 354 if ((fail_notify_address == GNUNET_NO) && (fail_pretty_printer == GNUNET_NO) && (fail_addr_to_str == GNUNET_NO) &&
355 (test_no_ident.test_failed == GNUNET_NO) && (test_too_short_ident.test_failed == GNUNET_NO) && (test_too_long_ident.test_failed == GNUNET_NO) && 355 (test_no_ident.test_failed == GNUNET_NO) && (test_too_short_ident.test_failed == GNUNET_NO) && (test_too_long_ident.test_failed == GNUNET_NO) &&
356 (test_valid_ident.test_failed == GNUNET_NO) && (fail_transmit_to_local_addrs == count_str_addr)) 356 (test_valid_ident.test_failed == GNUNET_NO) && (fail_msgs_transmited_to_local_addrs == count_str_addr))
357 { 357 {
358 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Tests successful\n"); 358 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Tests successful\n");
359 fail = 0; 359 fail = 0;
@@ -420,19 +420,18 @@ static void task_send_cont (void *cls,
420{ 420{
421 struct Plugin_Address * tmp_addr; 421 struct Plugin_Address * tmp_addr;
422 tmp_addr = addr_head; 422 tmp_addr = addr_head;
423 while (tmp_addr->next != NULL) 423
424 while (tmp_addr != NULL)
424 { 425 {
426 if (cls == tmp_addr)
427 if (result == GNUNET_OK) fail_msgs_transmited_to_local_addrs++;
425 tmp_addr = tmp_addr->next; 428 tmp_addr = tmp_addr->next;
426 } 429 }
427 430
428 if (cls != NULL) 431 if (fail_msgs_transmited_to_local_addrs == count_str_addr)
429 {
430 fail_transmit_to_local_addrs++;
431 }
432 if (fail_transmit_to_local_addrs == count_str_addr)
433 432
434 { 433 {
435 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message sent to %u addresses!\n",fail_transmit_to_local_addrs); 434 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message sent to %u addresses!\n",fail_msgs_transmited_to_local_addrs);
436 shutdown_clean(); 435 shutdown_clean();
437 } 436 }
438 437
@@ -996,7 +995,7 @@ run (void *cls,
996 fail_pretty_printer = GNUNET_YES; 995 fail_pretty_printer = GNUNET_YES;
997 fail_notify_address = GNUNET_YES; 996 fail_notify_address = GNUNET_YES;
998 fail_addr_to_str = GNUNET_YES; 997 fail_addr_to_str = GNUNET_YES;
999 fail_transmit_to_local_addrs = GNUNET_YES; 998 fail_msgs_transmited_to_local_addrs = 0;
1000 999
1001 addr_head = NULL; 1000 addr_head = NULL;
1002 count_str_addr = 0; 1001 count_str_addr = 0;