From: Christian Grothoff Date: Fri, 13 Nov 2009 20:28:32 +0000 (+0000) Subject: cleaning up X-Git-Tag: initial-import-from-subversion-38251~23093 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=eb80163ede13c3a8c2e76ce960d9c3d1aa965967;p=oweals%2Fgnunet.git cleaning up --- diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 9d9ba5690..1ad5befba 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c @@ -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) diff --git a/src/core/test_core_api_data.conf b/src/core/test_core_api_data.conf index cd85c85a4..47e6ec76f 100644 --- a/src/core/test_core_api_data.conf +++ b/src/core/test_core_api_data.conf @@ -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 diff --git a/src/core/test_core_api_peer1.conf b/src/core/test_core_api_peer1.conf index f1e89ef8e..a4510d254 100644 --- a/src/core/test_core_api_peer1.conf +++ b/src/core/test_core_api_peer1.conf @@ -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 diff --git a/src/core/test_core_api_peer2.conf b/src/core/test_core_api_peer2.conf index 2692499d1..a29090d78 100644 --- a/src/core/test_core_api_peer2.conf +++ b/src/core/test_core_api_peer2.conf @@ -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