diff options
Diffstat (limited to 'src/transport/gnunet-communicator-tcp.c')
-rw-r--r-- | src/transport/gnunet-communicator-tcp.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c index d8bf7c1a8..025326de7 100644 --- a/src/transport/gnunet-communicator-tcp.c +++ b/src/transport/gnunet-communicator-tcp.c | |||
@@ -1119,6 +1119,10 @@ pass_plaintext_to_core (struct Queue *queue, | |||
1119 | const struct GNUNET_MessageHeader *hdr = plaintext; | 1119 | const struct GNUNET_MessageHeader *hdr = plaintext; |
1120 | int ret; | 1120 | int ret; |
1121 | 1121 | ||
1122 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1123 | "pass message from %s to core\n", | ||
1124 | GNUNET_i2s (&queue->target)); | ||
1125 | |||
1122 | if (ntohs (hdr->size) != plaintext_len) | 1126 | if (ntohs (hdr->size) != plaintext_len) |
1123 | { | 1127 | { |
1124 | /* NOTE: If we ever allow multiple CORE messages in one | 1128 | /* NOTE: If we ever allow multiple CORE messages in one |
@@ -1132,6 +1136,8 @@ pass_plaintext_to_core (struct Queue *queue, | |||
1132 | ADDRESS_VALIDITY_PERIOD, | 1136 | ADDRESS_VALIDITY_PERIOD, |
1133 | &core_read_finished_cb, | 1137 | &core_read_finished_cb, |
1134 | queue); | 1138 | queue); |
1139 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1140 | "passed to core\n"); | ||
1135 | if (GNUNET_OK == ret) | 1141 | if (GNUNET_OK == ret) |
1136 | queue->backpressure++; | 1142 | queue->backpressure++; |
1137 | GNUNET_break (GNUNET_NO != ret); /* backpressure not working!? */ | 1143 | GNUNET_break (GNUNET_NO != ret); /* backpressure not working!? */ |
@@ -1795,7 +1801,7 @@ try_handle_plaintext (struct Queue *queue) | |||
1795 | queue->qh = GNUNET_TRANSPORT_communicator_mq_add (ch, | 1801 | queue->qh = GNUNET_TRANSPORT_communicator_mq_add (ch, |
1796 | &queue->target, | 1802 | &queue->target, |
1797 | foreign_addr, | 1803 | foreign_addr, |
1798 | UINT32_MAX, /* no MTU */ | 1804 | UINT16_MAX, /* no MTU */ |
1799 | GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED, | 1805 | GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED, |
1800 | 0, /* Priority */ | 1806 | 0, /* Priority */ |
1801 | queue->nt, | 1807 | queue->nt, |
@@ -2444,7 +2450,7 @@ boot_queue (struct Queue *queue) | |||
2444 | * Generate and transmit our ephemeral key and the signature for | 2450 | * Generate and transmit our ephemeral key and the signature for |
2445 | * the initial KX with the other peer. Must be called first, before | 2451 | * the initial KX with the other peer. Must be called first, before |
2446 | * any other bytes are ever written to the output buffer. Note that | 2452 | * any other bytes are ever written to the output buffer. Note that |
2447 | * our cipher must already be initialized when calling this function. | 2453 | * our cipher must already be initialized when calling thi function. |
2448 | * Helper function for #start_initial_kx_out(). | 2454 | * Helper function for #start_initial_kx_out(). |
2449 | * | 2455 | * |
2450 | * @param queue queue to do KX for | 2456 | * @param queue queue to do KX for |
@@ -2725,6 +2731,9 @@ proto_read_kx (void *cls) | |||
2725 | queue->listen_sock = pq->listen_sock; | 2731 | queue->listen_sock = pq->listen_sock; |
2726 | queue->sock = pq->sock; | 2732 | queue->sock = pq->sock; |
2727 | 2733 | ||
2734 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2735 | "created queue with target %s\n", | ||
2736 | GNUNET_i2s (&queue->target)); | ||
2728 | 2737 | ||
2729 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2738 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2730 | "start kx proto\n"); | 2739 | "start kx proto\n"); |
@@ -2984,6 +2993,9 @@ mq_init (void *cls, const struct GNUNET_PeerIdentity *peer, const char *address) | |||
2984 | queue->sock = sock; | 2993 | queue->sock = sock; |
2985 | queue->cs = GNUNET_TRANSPORT_CS_OUTBOUND; | 2994 | queue->cs = GNUNET_TRANSPORT_CS_OUTBOUND; |
2986 | boot_queue (queue); | 2995 | boot_queue (queue); |
2996 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2997 | "booted queue with target %s\n", | ||
2998 | GNUNET_i2s (&queue->target)); | ||
2987 | // queue->mq_awaits_continue = GNUNET_YES; | 2999 | // queue->mq_awaits_continue = GNUNET_YES; |
2988 | queue->read_task = | 3000 | queue->read_task = |
2989 | GNUNET_SCHEDULER_add_read_net (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, | 3001 | GNUNET_SCHEDULER_add_read_net (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, |
@@ -3646,6 +3658,10 @@ main (int argc, char *const *argv) | |||
3646 | }; | 3658 | }; |
3647 | int ret; | 3659 | int ret; |
3648 | 3660 | ||
3661 | GNUNET_log_from_nocheck (GNUNET_ERROR_TYPE_DEBUG, | ||
3662 | "transport", | ||
3663 | "Starting tcp communicator\n"); | ||
3664 | |||
3649 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 3665 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
3650 | return 2; | 3666 | return 2; |
3651 | 3667 | ||