cleaning up
authorChristian Grothoff <christian@grothoff.org>
Fri, 13 Nov 2009 20:28:32 +0000 (20:28 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 13 Nov 2009 20:28:32 +0000 (20:28 +0000)
src/core/gnunet-service-core.c
src/core/test_core_api_data.conf
src/core/test_core_api_peer1.conf
src/core/test_core_api_peer2.conf

index 9d9ba56903fef3fe1e145d74ca6894d6f02b007f..1ad5befba213877258a97d7d1ee580d114c98962 100644 (file)
@@ -1524,6 +1524,11 @@ batch_message (struct Neighbour *n,
           ret += pos->size;
           size -= pos->size;
           *priority += pos->priority;
+#if DEBUG_CORE
+         GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                     "Adding plaintext message with deadline %llu ms to batch\n",
+                     GNUNET_TIME_absolute_get_remaining (pos->deadline).value);
+#endif
           deadline->value = GNUNET_MIN (deadline->value, pos->deadline.value);
           GNUNET_free (pos);
           if (prev == NULL)
@@ -1537,6 +1542,11 @@ batch_message (struct Neighbour *n,
         }
       pos = next;
     }
+#if DEBUG_CORE
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Deadline for message batch is %llu ms\n",
+             GNUNET_TIME_absolute_get_remaining (*deadline).value);
+#endif
   return ret;
 }
 
@@ -1707,7 +1717,6 @@ process_plaintext_neighbour_queue (struct Neighbour *n)
                                       &retry_plaintext_processing, n);
       return;
     }
-
   ph->sequence_number = htonl (++n->last_sequence_number_sent);
   ph->inbound_bpm_limit = htonl (n->bpm_in);
   ph->timestamp = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
@@ -1726,9 +1735,10 @@ process_plaintext_neighbour_queue (struct Neighbour *n)
   /* encrypt */
 #if DEBUG_CORE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Encrypting %u bytes of plaintext messages for `%4s' for transmission.\n",
+              "Encrypting %u bytes of plaintext messages for `%4s' for transmission in %llums.\n",
              esize,
-             GNUNET_i2s(&n->peer));
+             GNUNET_i2s(&n->peer),
+             (unsigned long long) GNUNET_TIME_absolute_get_remaining (deadline).value);
 #endif
   GNUNET_assert (GNUNET_OK ==
                  do_encrypt (n,
@@ -2146,6 +2156,12 @@ send_key (struct Neighbour *n)
       GNUNET_break (0);
       break;
     }
+#if DEBUG_CORE
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Have %llu ms left for `%s' transmission.\n",
+             (unsigned long long) GNUNET_TIME_absolute_get_remaining (me->deadline).value,
+             "SET_KEY");
+#endif
   /* trigger queue processing */
   process_encrypted_neighbour_queue (n);
   if (n->status != PEER_STATE_KEY_CONFIRMED)
index cd85c85a492c284bce0af7495ab6bd92465bd05f..47e6ec76f69a62a479ba09378554ccbc72a5630a 100644 (file)
@@ -1,27 +1,5 @@
 [PATHS]
-SERVICEHOME = /tmp/test-gnunetd-fs-download/
-
-[resolver]
-PORT = 2464
-
-[transport]
-PORT = 2465
-PLUGINS = tcp
-
-[arm]
-PORT = 2466
-
-[statistics]
-PORT = 2467
-
-[tcp]
-PORT = 2468
-
-[peerinfo]
-PORT = 2469
-
-[core]
-PORT = 2470
+SERVICEHOME = /tmp/test-gnunet-core/
 
 [testing]
 WEAKRANDOM = YES
index f1e89ef8e00c371a457ece64a40cd59872730134..a4510d2547f3ad34392d3b7fbf6baad16dcedc27 100644 (file)
@@ -1,5 +1,5 @@
 [PATHS]
-SERVICEHOME = /tmp/test-gnunetd-core-peer-1/
+SERVICEHOME = /tmp/test-gnunet-core-peer-1/
 DEFAULTCONFIG = test_core_api_peer1.conf
 
 [resolver]
@@ -25,11 +25,13 @@ PORT = 12467
 
 [transport-tcp]
 PORT = 12468
+#DEBUG = YES
 
 [peerinfo]
 PORT = 12469
 #PREFIX = xterm -T peerinfo1 -e valgrind --tool=memcheck
 #PREFIX = xterm -T peerinfo1 -e
+#DEBUG = YES
 
 [core]
 PORT = 12470
index 2692499d1b4e562ef3fb433d1cf23451648cabd6..a29090d7851e45f43bafbdd3996750dd97ede6c4 100644 (file)
@@ -1,5 +1,5 @@
 [PATHS]
-SERVICEHOME = /tmp/test-gnunetd-core-peer-2/
+SERVICEHOME = /tmp/test-gnunet-core-peer-2/
 DEFAULTCONFIG = test_core_api_peer2.conf
 
 [resolver]
@@ -24,11 +24,13 @@ PORT = 22467
 
 [transport-tcp]
 PORT = 22468
+#DEBUG = YES
 
 [peerinfo]
 PORT = 22469
 #PREFIX = xterm -T peerinfo2 -e valgrind --tool=memcheck
 #PREFIX = xterm -T peerinfo2 -e 
+#DEBUG = YES
 
 [core]
 PORT = 22470