From: Matthias Wachs Date: Mon, 14 Jun 2010 14:22:10 +0000 (+0000) Subject: (no commit message) X-Git-Tag: initial-import-from-subversion-38251~21390 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1cb8bd8733c30c9bbc049ff67b0aa2fd6e595696;p=oweals%2Fgnunet.git --- diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 104f8de03..fd813b75f 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -538,7 +538,7 @@ accessHandlerCallback (void *cls, if ( GNUNET_YES == res) { /* existing session for this address found */ - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Session `%s' found\n",address); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Session for peer `%s' found\n",GNUNET_i2s(&cs->sender)); break; } cs = cs->next; @@ -1017,7 +1017,7 @@ static void send_execute (void *cls, else { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Send to %s completed.\n", cs->ip); + "Send to peer `%s' completed.\n", GNUNET_i2s(&cs->sender)); if (GNUNET_OK != remove_http_message(cs, cs->pending_outbound_msg)) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message could not be removed from session `%s'", GNUNET_i2s(&cs->sender)); @@ -1164,7 +1164,6 @@ http_plugin_send (void *cls, { /* create new session object */ - /*FIXME: what is const void * really? Assuming struct sockaddr_in * ! */ ses = create_session(NULL, (struct sockaddr_in *) addr, target); ses->is_active = GNUNET_YES; diff --git a/src/transport/test_plugin_transport_http.c b/src/transport/test_plugin_transport_http.c index 5f262bf5d..5540e7fae 100644 --- a/src/transport/test_plugin_transport_http.c +++ b/src/transport/test_plugin_transport_http.c @@ -324,6 +324,11 @@ static struct HTTP_Transfer test_valid_ident; */ static int fail; +/** + * Number of local addresses + */ +static unsigned int count_str_addr; + CURL *curl_handle; /** @@ -348,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 == GNUNET_NO)) + (test_valid_ident.test_failed == GNUNET_NO) && (fail_transmit_to_local_addrs == count_str_addr)) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Tests successful\n"); fail = 0; @@ -420,9 +425,14 @@ static void task_send_cont (void *cls, tmp_addr = tmp_addr->next; } - if (cls == tmp_addr) + if (cls != NULL) { - fail_transmit_to_local_addrs = GNUNET_NO; + fail_transmit_to_local_addrs++; + } + if (fail_transmit_to_local_addrs == count_str_addr) + + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message sent to %u addresses!\n",fail_transmit_to_local_addrs); shutdown_clean(); } @@ -980,7 +990,7 @@ run (void *cls, struct Plugin_Address * cur; const char * addr_str; - unsigned int count_str_addr; + unsigned int suggest_res; fail_pretty_printer = GNUNET_YES;