aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/gnunet-service-core.c22
-rw-r--r--src/core/test_core_api_data.conf24
-rw-r--r--src/core/test_core_api_peer1.conf4
-rw-r--r--src/core/test_core_api_peer2.conf4
4 files changed, 26 insertions, 28 deletions
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,
1524 ret += pos->size; 1524 ret += pos->size;
1525 size -= pos->size; 1525 size -= pos->size;
1526 *priority += pos->priority; 1526 *priority += pos->priority;
1527#if DEBUG_CORE
1528 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1529 "Adding plaintext message with deadline %llu ms to batch\n",
1530 GNUNET_TIME_absolute_get_remaining (pos->deadline).value);
1531#endif
1527 deadline->value = GNUNET_MIN (deadline->value, pos->deadline.value); 1532 deadline->value = GNUNET_MIN (deadline->value, pos->deadline.value);
1528 GNUNET_free (pos); 1533 GNUNET_free (pos);
1529 if (prev == NULL) 1534 if (prev == NULL)
@@ -1537,6 +1542,11 @@ batch_message (struct Neighbour *n,
1537 } 1542 }
1538 pos = next; 1543 pos = next;
1539 } 1544 }
1545#if DEBUG_CORE
1546 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1547 "Deadline for message batch is %llu ms\n",
1548 GNUNET_TIME_absolute_get_remaining (*deadline).value);
1549#endif
1540 return ret; 1550 return ret;
1541} 1551}
1542 1552
@@ -1707,7 +1717,6 @@ process_plaintext_neighbour_queue (struct Neighbour *n)
1707 &retry_plaintext_processing, n); 1717 &retry_plaintext_processing, n);
1708 return; 1718 return;
1709 } 1719 }
1710
1711 ph->sequence_number = htonl (++n->last_sequence_number_sent); 1720 ph->sequence_number = htonl (++n->last_sequence_number_sent);
1712 ph->inbound_bpm_limit = htonl (n->bpm_in); 1721 ph->inbound_bpm_limit = htonl (n->bpm_in);
1713 ph->timestamp = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); 1722 ph->timestamp = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
@@ -1726,9 +1735,10 @@ process_plaintext_neighbour_queue (struct Neighbour *n)
1726 /* encrypt */ 1735 /* encrypt */
1727#if DEBUG_CORE 1736#if DEBUG_CORE
1728 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1737 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1729 "Encrypting %u bytes of plaintext messages for `%4s' for transmission.\n", 1738 "Encrypting %u bytes of plaintext messages for `%4s' for transmission in %llums.\n",
1730 esize, 1739 esize,
1731 GNUNET_i2s(&n->peer)); 1740 GNUNET_i2s(&n->peer),
1741 (unsigned long long) GNUNET_TIME_absolute_get_remaining (deadline).value);
1732#endif 1742#endif
1733 GNUNET_assert (GNUNET_OK == 1743 GNUNET_assert (GNUNET_OK ==
1734 do_encrypt (n, 1744 do_encrypt (n,
@@ -2146,6 +2156,12 @@ send_key (struct Neighbour *n)
2146 GNUNET_break (0); 2156 GNUNET_break (0);
2147 break; 2157 break;
2148 } 2158 }
2159#if DEBUG_CORE
2160 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2161 "Have %llu ms left for `%s' transmission.\n",
2162 (unsigned long long) GNUNET_TIME_absolute_get_remaining (me->deadline).value,
2163 "SET_KEY");
2164#endif
2149 /* trigger queue processing */ 2165 /* trigger queue processing */
2150 process_encrypted_neighbour_queue (n); 2166 process_encrypted_neighbour_queue (n);
2151 if (n->status != PEER_STATE_KEY_CONFIRMED) 2167 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 @@
1[PATHS] 1[PATHS]
2SERVICEHOME = /tmp/test-gnunetd-fs-download/ 2SERVICEHOME = /tmp/test-gnunet-core/
3
4[resolver]
5PORT = 2464
6
7[transport]
8PORT = 2465
9PLUGINS = tcp
10
11[arm]
12PORT = 2466
13
14[statistics]
15PORT = 2467
16
17[tcp]
18PORT = 2468
19
20[peerinfo]
21PORT = 2469
22
23[core]
24PORT = 2470
25 3
26[testing] 4[testing]
27WEAKRANDOM = YES 5WEAKRANDOM = 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 @@
1[PATHS] 1[PATHS]
2SERVICEHOME = /tmp/test-gnunetd-core-peer-1/ 2SERVICEHOME = /tmp/test-gnunet-core-peer-1/
3DEFAULTCONFIG = test_core_api_peer1.conf 3DEFAULTCONFIG = test_core_api_peer1.conf
4 4
5[resolver] 5[resolver]
@@ -25,11 +25,13 @@ PORT = 12467
25 25
26[transport-tcp] 26[transport-tcp]
27PORT = 12468 27PORT = 12468
28#DEBUG = YES
28 29
29[peerinfo] 30[peerinfo]
30PORT = 12469 31PORT = 12469
31#PREFIX = xterm -T peerinfo1 -e valgrind --tool=memcheck 32#PREFIX = xterm -T peerinfo1 -e valgrind --tool=memcheck
32#PREFIX = xterm -T peerinfo1 -e 33#PREFIX = xterm -T peerinfo1 -e
34#DEBUG = YES
33 35
34[core] 36[core]
35PORT = 12470 37PORT = 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 @@
1[PATHS] 1[PATHS]
2SERVICEHOME = /tmp/test-gnunetd-core-peer-2/ 2SERVICEHOME = /tmp/test-gnunet-core-peer-2/
3DEFAULTCONFIG = test_core_api_peer2.conf 3DEFAULTCONFIG = test_core_api_peer2.conf
4 4
5[resolver] 5[resolver]
@@ -24,11 +24,13 @@ PORT = 22467
24 24
25[transport-tcp] 25[transport-tcp]
26PORT = 22468 26PORT = 22468
27#DEBUG = YES
27 28
28[peerinfo] 29[peerinfo]
29PORT = 22469 30PORT = 22469
30#PREFIX = xterm -T peerinfo2 -e valgrind --tool=memcheck 31#PREFIX = xterm -T peerinfo2 -e valgrind --tool=memcheck
31#PREFIX = xterm -T peerinfo2 -e 32#PREFIX = xterm -T peerinfo2 -e
33#DEBUG = YES
32 34
33[core] 35[core]
34PORT = 22470 36PORT = 22470