diags
authorChristian Grothoff <christian@grothoff.org>
Tue, 14 Jul 2009 13:42:54 +0000 (13:42 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 14 Jul 2009 13:42:54 +0000 (13:42 +0000)
TODO
src/transport/gnunet-service-transport.c
src/transport/plugin_transport_tcp.c
src/transport/test_transport_api.c
src/transport/test_transport_api_peer1.conf
src/transport/test_transport_api_peer2.conf

diff --git a/TODO b/TODO
index 912b60b625944d939f08834614ae9193659afa3f..5a8a6f23c24cc8e1a5f80d78404861eae58ce16e 100644 (file)
--- 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)
index 3bef28343ca5d81dcd13b979eca7d24ccea2a396..2e5240e13876a19119179e17f284e37143a508a8 100644 (file)
@@ -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)
index cde0e9f45ac922d05647a15b17dd97dfba7b8253..f9fdc75ef9b1539dab148054acc7a3bd272de298 100644 (file)
@@ -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
 }
index a6a914023400e8ee2924cc1fb6fdc8e95c14f51e..33ee4b8cf0bec34ee39ef4e396ac15a3bbc27b64 100644 (file)
@@ -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;
 }
index 82109356e629d87e5d8aaaab24be4d2738da3d81..0ebda5786242aa3c952456257b97b89732a5c03c 100644 (file)
@@ -8,7 +8,7 @@ PORT = 12364
 [transport]
 PORT = 12365
 PLUGINS = tcp
-DEBUG = YES
+DEBUG = YES
 
 [arm]
 PORT = 12366
index d1fc2ea63eaf67404160030d7eedad52b40abfb4..d7efd65170050ed9fb693ed7605e8e209d6c5f8e 100644 (file)
@@ -8,7 +8,7 @@ PORT = 22364
 [transport]
 PORT = 22365
 PLUGINS = tcp
-DEBUG = YES
+DEBUG = YES
 
 [arm]
 PORT = 22366