From 90a4c9922ef5fe5d15b832598449de8663b110bb Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 14 Jun 2010 14:47:11 +0000 Subject: [PATCH] --- src/transport/test_plugin_transport_http.c | 21 ++++++++++----------- 1 file 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; static int fail_addr_to_str; /** - * Did the test pass or fail? + * No. of msgs transmitted successfully to local addresses */ -static int fail_transmit_to_local_addrs; +static int fail_msgs_transmited_to_local_addrs; /** * Test: connect to peer without peer identification @@ -353,7 +353,7 @@ shutdown_clean () /* Evaluate results */ if ((fail_notify_address == GNUNET_NO) && (fail_pretty_printer == GNUNET_NO) && (fail_addr_to_str == GNUNET_NO) && (test_no_ident.test_failed == GNUNET_NO) && (test_too_short_ident.test_failed == GNUNET_NO) && (test_too_long_ident.test_failed == GNUNET_NO) && - (test_valid_ident.test_failed == GNUNET_NO) && (fail_transmit_to_local_addrs == count_str_addr)) + (test_valid_ident.test_failed == GNUNET_NO) && (fail_msgs_transmited_to_local_addrs == count_str_addr)) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Tests successful\n"); fail = 0; @@ -420,19 +420,18 @@ static void task_send_cont (void *cls, { struct Plugin_Address * tmp_addr; tmp_addr = addr_head; - while (tmp_addr->next != NULL) + + while (tmp_addr != NULL) { + if (cls == tmp_addr) + if (result == GNUNET_OK) fail_msgs_transmited_to_local_addrs++; tmp_addr = tmp_addr->next; } - if (cls != NULL) - { - fail_transmit_to_local_addrs++; - } - if (fail_transmit_to_local_addrs == count_str_addr) + if (fail_msgs_transmited_to_local_addrs == count_str_addr) { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message sent to %u addresses!\n",fail_transmit_to_local_addrs); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message sent to %u addresses!\n",fail_msgs_transmited_to_local_addrs); shutdown_clean(); } @@ -996,7 +995,7 @@ run (void *cls, fail_pretty_printer = GNUNET_YES; fail_notify_address = GNUNET_YES; fail_addr_to_str = GNUNET_YES; - fail_transmit_to_local_addrs = GNUNET_YES; + fail_msgs_transmited_to_local_addrs = 0; addr_head = NULL; count_str_addr = 0; -- 2.25.1