diff options
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index d2dd2e752..7993bf2f4 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -1229,10 +1229,11 @@ transmit_send_continuation (void *cls, | |||
1229 | gettext_noop | 1229 | gettext_noop |
1230 | ("# transmission failures for messages to other peers"), | 1230 | ("# transmission failures for messages to other peers"), |
1231 | 1, GNUNET_NO); | 1231 | 1, GNUNET_NO); |
1232 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1232 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
1233 | "Sending message to `%s' of type %u was a %s\n", | 1233 | "Sending message to `%s' of type %u with %u bytes was a %s\n", |
1234 | GNUNET_i2s (receiver), | 1234 | GNUNET_i2s (receiver), |
1235 | ntohs (((struct GNUNET_MessageHeader *) mq->message_buf)->type), | 1235 | ntohs (((struct GNUNET_MessageHeader *) mq->message_buf)->type), |
1236 | mq->message_buf_size, | ||
1236 | (success == GNUNET_OK) ? "success" : "FAILURE"); | 1237 | (success == GNUNET_OK) ? "success" : "FAILURE"); |
1237 | if (NULL != mq->cont) | 1238 | if (NULL != mq->cont) |
1238 | mq->cont (mq->cont_cls, success, size_payload, physical); | 1239 | mq->cont (mq->cont_cls, success, size_payload, physical); |
@@ -1296,6 +1297,11 @@ try_transmission_to_peer (struct NeighbourMapEntry *n) | |||
1296 | return; /* no more messages */ | 1297 | return; /* no more messages */ |
1297 | GNUNET_CONTAINER_DLL_remove (n->messages_head, n->messages_tail, mq); | 1298 | GNUNET_CONTAINER_DLL_remove (n->messages_head, n->messages_tail, mq); |
1298 | n->is_active = mq; | 1299 | n->is_active = mq; |
1300 | |||
1301 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
1302 | "Giving message with %u bytes to plugin session %p\n", | ||
1303 | mq->message_buf_size, n->primary_address.session); | ||
1304 | |||
1299 | (void) send_with_session (n, | 1305 | (void) send_with_session (n, |
1300 | mq->message_buf, mq->message_buf_size, | 1306 | mq->message_buf, mq->message_buf_size, |
1301 | 0 /* priority */, timeout, GNUNET_NO, | 1307 | 0 /* priority */, timeout, GNUNET_NO, |
@@ -1635,10 +1641,11 @@ GST_neighbours_send (const struct GNUNET_PeerIdentity *target, const void *msg, | |||
1635 | mq->message_buf = (const char *) &mq[1]; | 1641 | mq->message_buf = (const char *) &mq[1]; |
1636 | mq->message_buf_size = msg_size; | 1642 | mq->message_buf_size = msg_size; |
1637 | mq->timeout = GNUNET_TIME_relative_to_absolute (timeout); | 1643 | mq->timeout = GNUNET_TIME_relative_to_absolute (timeout); |
1644 | |||
1645 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Enqueueing %u bytes to send to peer %s\n", | ||
1646 | msg_size, GNUNET_i2s (target)); | ||
1647 | |||
1638 | GNUNET_CONTAINER_DLL_insert_tail (n->messages_head, n->messages_tail, mq); | 1648 | GNUNET_CONTAINER_DLL_insert_tail (n->messages_head, n->messages_tail, mq); |
1639 | if ( (NULL != n->is_active) || | ||
1640 | ( (NULL == n->primary_address.session) && (NULL == n->primary_address.address)) ) | ||
1641 | return; | ||
1642 | if (GNUNET_SCHEDULER_NO_TASK != n->task) | 1649 | if (GNUNET_SCHEDULER_NO_TASK != n->task) |
1643 | GNUNET_SCHEDULER_cancel (n->task); | 1650 | GNUNET_SCHEDULER_cancel (n->task); |
1644 | n->task = GNUNET_SCHEDULER_add_now (&master_task, n); | 1651 | n->task = GNUNET_SCHEDULER_add_now (&master_task, n); |
@@ -2073,8 +2080,7 @@ notification_cb(void *cls, const struct GNUNET_PeerIdentity *key, void *value) | |||
2073 | return GNUNET_OK; | 2080 | return GNUNET_OK; |
2074 | } | 2081 | } |
2075 | 2082 | ||
2076 | static | 2083 | static int |
2077 | int | ||
2078 | free_notification_cb(void *cls, const struct GNUNET_PeerIdentity *key, | 2084 | free_notification_cb(void *cls, const struct GNUNET_PeerIdentity *key, |
2079 | void *value) | 2085 | void *value) |
2080 | { | 2086 | { |