diff options
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index c44afa91e..404dadb80 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -1224,13 +1224,20 @@ disconnect_neighbour (struct NeighbourMapEntry *n) | |||
1224 | static void | 1224 | static void |
1225 | transmit_send_continuation (void *cls, | 1225 | transmit_send_continuation (void *cls, |
1226 | const struct GNUNET_PeerIdentity *receiver, | 1226 | const struct GNUNET_PeerIdentity *receiver, |
1227 | int success, size_t size_payload, size_t physical) | 1227 | int success, |
1228 | size_t size_payload, | ||
1229 | size_t physical) | ||
1228 | { | 1230 | { |
1229 | struct MessageQueue *mq = cls; | 1231 | struct MessageQueue *mq = cls; |
1230 | struct NeighbourMapEntry *n; | 1232 | struct NeighbourMapEntry *n; |
1231 | 1233 | ||
1232 | if (NULL == (n = lookup_neighbour (receiver))) | 1234 | if (NULL == (n = lookup_neighbour (receiver))) |
1233 | { | 1235 | { |
1236 | if (NULL != mq->cont) | ||
1237 | mq->cont (mq->cont_cls, | ||
1238 | GNUNET_SYSERR /* not connected */, | ||
1239 | size_payload, | ||
1240 | 0); | ||
1234 | GNUNET_free (mq); | 1241 | GNUNET_free (mq); |
1235 | return; /* disconnect or other error while transmitting, can happen */ | 1242 | return; /* disconnect or other error while transmitting, can happen */ |
1236 | } | 1243 | } |
@@ -1255,7 +1262,6 @@ transmit_send_continuation (void *cls, | |||
1255 | GNUNET_break (0); | 1262 | GNUNET_break (0); |
1256 | } | 1263 | } |
1257 | 1264 | ||
1258 | |||
1259 | GNUNET_break (size_payload == mq->message_buf_size); | 1265 | GNUNET_break (size_payload == mq->message_buf_size); |
1260 | bytes_in_send_queue -= mq->message_buf_size; | 1266 | bytes_in_send_queue -= mq->message_buf_size; |
1261 | GNUNET_STATISTICS_set (GST_stats, | 1267 | GNUNET_STATISTICS_set (GST_stats, |
@@ -1327,9 +1333,9 @@ try_transmission_to_peer (struct NeighbourMapEntry *n) | |||
1327 | if (timeout.rel_value_us > 0) | 1333 | if (timeout.rel_value_us > 0) |
1328 | break; | 1334 | break; |
1329 | GNUNET_STATISTICS_update (GST_stats, | 1335 | GNUNET_STATISTICS_update (GST_stats, |
1330 | gettext_noop | 1336 | gettext_noop ("# messages timed out while in transport queue"), |
1331 | ("# messages timed out while in transport queue"), | 1337 | 1, |
1332 | 1, GNUNET_NO); | 1338 | GNUNET_NO); |
1333 | GNUNET_CONTAINER_DLL_remove (n->messages_head, | 1339 | GNUNET_CONTAINER_DLL_remove (n->messages_head, |
1334 | n->messages_tail, | 1340 | n->messages_tail, |
1335 | mq); | 1341 | mq); |