From: Christian Grothoff Date: Tue, 14 Jul 2009 13:42:54 +0000 (+0000) Subject: diags X-Git-Tag: initial-import-from-subversion-38251~23698 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a0a00bf29253a9af1fdec7ccd9dda4d7f46a0ff8;p=oweals%2Fgnunet.git diags --- diff --git a/TODO b/TODO index 912b60b62..5a8a6f23c 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,17 @@ PHASE #1: (Goal: settle key design questions) TRANSPORT: -* testcase fails the first time when run with fresh /tmp\ +* testcase fails the first time when run with fresh /tmp + 1) CONNECT fails because no validated HELLO is available + (actual validations are scheduled a few cycles later) + 2) client waits for SEND_OK, which never comes (due to + CONNECT request failing; TCP signals error, but + "transmit_send_continuation" in gnunet-service-transport.c + does not (and currently has no way to) signal this to + the test-process => test-process eventually times out with + fatal error + 3) in the meantime, gnunet-service-transport validates the + HELLOs => testcase passes next time... Util: * improve disk API [Nils] (Nils, is this done? -Christian) diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 3bef28343..2e5240e13 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -854,7 +854,8 @@ transmit_send_continuation (void *cls, else { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Transmission failed, marking connection as down.\n"); + "Transmission to peer `%s' failed, marking connection as down.\n", + GNUNET_i2s(target)); rl->connected = GNUNET_NO; } if (!mq->internal_msg) diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index cde0e9f45..f9fdc75ef 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -771,7 +771,9 @@ disconnect_session (struct Session *session) #if DEBUG_TCP GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", - "Disconnecting from other peer (session %p).\n", session); + "Disconnecting from `%4s' (session %p).\n", + GNUNET_i2s(&session->target), + session); #endif /* remove from session list */ prev = NULL; @@ -903,7 +905,9 @@ try_connect_to_address (void *cls, GNUNET_SERVER_MAX_MESSAGE_SIZE); #if DEBUG_TCP GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, - "tcp", "Connected to other peer.\n"); + "tcp", + "Connecting using address %s.\n", + GNUNET_a2s(addr, addrlen)); #endif return GNUNET_SYSERR; } @@ -939,7 +943,8 @@ session_try_connect (void *cls, #if DEBUG_TCP GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", - "Connected to other peer, now processing messages.\n"); + "Connected to , now processing messages.\n", + GNUNET_i2s(&session->target)); #endif process_pending_messages (session); } @@ -948,7 +953,9 @@ session_try_connect (void *cls, #if DEBUG_TCP GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", - "Failed to connect to other peer, now closing session.\n"); + "Failed to connect to `%4s' (no working `%s'), closing session.\n", + GNUNET_i2s(&session->target), + "HELLO"); #endif disconnect_session (session); } @@ -967,7 +974,8 @@ session_try_connect (void *cls, #if DEBUG_TCP GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", - "Asked to connect, but have no addresses to try.\n"); + "Asked to connect to `%4s', but have no addresses to try.\n", + GNUNET_i2s(&session->target)); #endif return; } @@ -991,7 +999,9 @@ session_try_connect (void *cls, cctx.sa); #if DEBUG_TCP GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Connected getting client address %p\n", session->client); + "Connected to `%4s' for session %p\n", + GNUNET_i2s(&session->target), + session->client); #endif if (session->client == NULL) { @@ -1007,7 +1017,8 @@ session_try_connect (void *cls, #if DEBUG_TCP GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", - "Connected to other peer, now sending `%s' message.\n", + "Connected to `%4s', now sending `%s' message.\n", + GNUNET_i2s(&session->target), "WELCOME"); #endif } diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index a6a914023..33ee4b8cf 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c @@ -31,7 +31,7 @@ #include "gnunet_transport_service.h" #include "transport.h" -#define VERBOSE GNUNET_NO +#define VERBOSE GNUNET_YES #define START_ARM GNUNET_YES @@ -118,7 +118,10 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, struct GNUNET_TIME_Relative latency) { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer connected to us (%p)!\n", cls); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Peer `%4s' connected to us (%p)!\n", + GNUNET_i2s(peer), + cls); GNUNET_assert ((ok >= 1) && (ok <= 6)); OKPP; } diff --git a/src/transport/test_transport_api_peer1.conf b/src/transport/test_transport_api_peer1.conf index 82109356e..0ebda5786 100644 --- a/src/transport/test_transport_api_peer1.conf +++ b/src/transport/test_transport_api_peer1.conf @@ -8,7 +8,7 @@ PORT = 12364 [transport] PORT = 12365 PLUGINS = tcp -# DEBUG = YES +DEBUG = YES [arm] PORT = 12366 diff --git a/src/transport/test_transport_api_peer2.conf b/src/transport/test_transport_api_peer2.conf index d1fc2ea63..d7efd6517 100644 --- a/src/transport/test_transport_api_peer2.conf +++ b/src/transport/test_transport_api_peer2.conf @@ -8,7 +8,7 @@ PORT = 22364 [transport] PORT = 22365 PLUGINS = tcp -# DEBUG = YES +DEBUG = YES [arm] PORT = 22366