diff options
-rw-r--r-- | src/transport/plugin_transport_udp.c | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index d0116ea14..0a8c3cab4 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -1347,7 +1347,7 @@ udp_disconnect_session (void *cls, | |||
1347 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1347 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1348 | "Session %p to peer `%s' address ended\n", s, | 1348 | "Session %p to peer `%s' address ended\n", s, |
1349 | GNUNET_i2s (&s->target), | 1349 | GNUNET_i2s (&s->target), |
1350 | udp_address_to_string (NULL, | 1350 | udp_address_to_string (plugin, |
1351 | s->address->address, | 1351 | s->address->address, |
1352 | s->address->address_length)); | 1352 | s->address->address_length)); |
1353 | /* stop timeout task */ | 1353 | /* stop timeout task */ |
@@ -1534,11 +1534,11 @@ session_timeout (void *cls, | |||
1534 | s); | 1534 | s); |
1535 | return; | 1535 | return; |
1536 | } | 1536 | } |
1537 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1537 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1538 | "Session %p was idle for %s, disconnecting\n", | 1538 | "Session %p was idle for %s, disconnecting\n", |
1539 | s, | 1539 | s, |
1540 | GNUNET_STRINGS_relative_time_to_string (UDP_SESSION_TIME_OUT, | 1540 | GNUNET_STRINGS_relative_time_to_string (UDP_SESSION_TIME_OUT, |
1541 | GNUNET_YES)); | 1541 | GNUNET_YES)); |
1542 | /* call session destroy function */ | 1542 | /* call session destroy function */ |
1543 | udp_disconnect_session (plugin, s); | 1543 | udp_disconnect_session (plugin, s); |
1544 | } | 1544 | } |
@@ -1635,10 +1635,10 @@ session_cmp_it (void *cls, | |||
1635 | 1635 | ||
1636 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1636 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1637 | "Comparing address %s <-> %s\n", | 1637 | "Comparing address %s <-> %s\n", |
1638 | udp_address_to_string (NULL, | 1638 | udp_address_to_string (s->plugin, |
1639 | address->address, | 1639 | address->address, |
1640 | address->address_length), | 1640 | address->address_length), |
1641 | udp_address_to_string (NULL, | 1641 | udp_address_to_string (s->plugin, |
1642 | s->address->address, | 1642 | s->address->address, |
1643 | s->address->address_length)); | 1643 | s->address->address_length)); |
1644 | if (0 == GNUNET_HELLO_address_cmp(s->address, cctx->address)) | 1644 | if (0 == GNUNET_HELLO_address_cmp(s->address, cctx->address)) |
@@ -1704,7 +1704,9 @@ udp_plugin_lookup_session (void *cls, | |||
1704 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1704 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1705 | "Looking for existing session for peer `%s' `%s' \n", | 1705 | "Looking for existing session for peer `%s' `%s' \n", |
1706 | GNUNET_i2s (&address->peer), | 1706 | GNUNET_i2s (&address->peer), |
1707 | udp_address_to_string(NULL, address->address, address->address_length)); | 1707 | udp_address_to_string (plugin, |
1708 | address->address, | ||
1709 | address->address_length)); | ||
1708 | GNUNET_CONTAINER_multipeermap_get_multiple (plugin->sessions, | 1710 | GNUNET_CONTAINER_multipeermap_get_multiple (plugin->sessions, |
1709 | &address->peer, | 1711 | &address->peer, |
1710 | &session_cmp_it, | 1712 | &session_cmp_it, |
@@ -2035,7 +2037,7 @@ udp_plugin_send (void *cls, | |||
2035 | "UDP transmits %u-byte message to `%s' using address `%s'\n", | 2037 | "UDP transmits %u-byte message to `%s' using address `%s'\n", |
2036 | udpmlen, | 2038 | udpmlen, |
2037 | GNUNET_i2s (&s->target), | 2039 | GNUNET_i2s (&s->target), |
2038 | udp_address_to_string (NULL, | 2040 | udp_address_to_string (plugin, |
2039 | s->address->address, | 2041 | s->address->address, |
2040 | s->address->address_length)); | 2042 | s->address->address_length)); |
2041 | 2043 | ||
@@ -2365,11 +2367,11 @@ ack_proc (void *cls, | |||
2365 | GNUNET_HELLO_address_free (address); | 2367 | GNUNET_HELLO_address_free (address); |
2366 | if (NULL == s) | 2368 | if (NULL == s) |
2367 | { | 2369 | { |
2368 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 2370 | LOG (GNUNET_ERROR_TYPE_ERROR, |
2369 | "Trying to transmit ACK to peer `%s' but no session found!\n", | 2371 | "Trying to transmit ACK to peer `%s' but no session found!\n", |
2370 | udp_address_to_string (rc->plugin, | 2372 | udp_address_to_string (rc->plugin, |
2371 | rc->udp_addr, | 2373 | rc->udp_addr, |
2372 | rc->udp_addr_len)); | 2374 | rc->udp_addr_len)); |
2373 | GNUNET_CONTAINER_heap_remove_node (rc->hnode); | 2375 | GNUNET_CONTAINER_heap_remove_node (rc->hnode); |
2374 | GNUNET_DEFRAGMENT_context_destroy (rc->defrag); | 2376 | GNUNET_DEFRAGMENT_context_destroy (rc->defrag); |
2375 | GNUNET_free (rc); | 2377 | GNUNET_free (rc); |
@@ -2440,14 +2442,18 @@ read_process_ack (struct Plugin *plugin, | |||
2440 | GNUNET_HELLO_ADDRESS_INFO_NONE); | 2442 | GNUNET_HELLO_ADDRESS_INFO_NONE); |
2441 | s = udp_plugin_lookup_session (plugin, | 2443 | s = udp_plugin_lookup_session (plugin, |
2442 | address); | 2444 | address); |
2443 | GNUNET_HELLO_address_free (address); | ||
2444 | if ( (NULL == s) || | 2445 | if ( (NULL == s) || |
2445 | (NULL == s->frag_ctx) ) | 2446 | (NULL == s->frag_ctx) ) |
2446 | { | 2447 | { |
2447 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 2448 | LOG (GNUNET_ERROR_TYPE_WARNING, |
2448 | "UDP session for ACK not found\n"); | 2449 | "UDP session of address %s for ACK not found\n", |
2450 | udp_address_to_string (plugin, | ||
2451 | address->address, | ||
2452 | address->address_length)); | ||
2453 | GNUNET_HELLO_address_free (address); | ||
2449 | return; | 2454 | return; |
2450 | } | 2455 | } |
2456 | GNUNET_HELLO_address_free (address); | ||
2451 | 2457 | ||
2452 | flow_delay.rel_value_us = (uint64_t) ntohl (udp_ack->delay); | 2458 | flow_delay.rel_value_us = (uint64_t) ntohl (udp_ack->delay); |
2453 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 2459 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
@@ -3209,8 +3215,8 @@ setup_sockets (struct Plugin *plugin, | |||
3209 | { | 3215 | { |
3210 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, | 3216 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, |
3211 | "socket"); | 3217 | "socket"); |
3212 | LOG(GNUNET_ERROR_TYPE_WARNING, | 3218 | LOG (GNUNET_ERROR_TYPE_WARNING, |
3213 | "Disabling IPv4 since it is not supported on this system!\n"); | 3219 | "Disabling IPv4 since it is not supported on this system!\n"); |
3214 | plugin->enable_ipv4 = GNUNET_NO; | 3220 | plugin->enable_ipv4 = GNUNET_NO; |
3215 | } | 3221 | } |
3216 | else | 3222 | else |