diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/gnunet-service-core.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index c5247854f..651fbe16b 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c | |||
@@ -1376,8 +1376,9 @@ select_messages (struct Neighbour *n, | |||
1376 | uint64_t avail; | 1376 | uint64_t avail; |
1377 | struct GNUNET_TIME_Relative slack; /* how long could we wait before missing deadlines? */ | 1377 | struct GNUNET_TIME_Relative slack; /* how long could we wait before missing deadlines? */ |
1378 | size_t off; | 1378 | size_t off; |
1379 | int discard_low_prio; | 1379 | uint64_t tsize; |
1380 | unsigned int queue_size; | 1380 | unsigned int queue_size; |
1381 | int discard_low_prio; | ||
1381 | 1382 | ||
1382 | GNUNET_assert (NULL != n->messages); | 1383 | GNUNET_assert (NULL != n->messages); |
1383 | now = GNUNET_TIME_absolute_get (); | 1384 | now = GNUNET_TIME_absolute_get (); |
@@ -1387,10 +1388,12 @@ select_messages (struct Neighbour *n, | |||
1387 | priority from consideration for scheduling at the | 1388 | priority from consideration for scheduling at the |
1388 | end of the loop? */ | 1389 | end of the loop? */ |
1389 | queue_size = 0; | 1390 | queue_size = 0; |
1391 | tsize = 0; | ||
1390 | pos = n->messages; | 1392 | pos = n->messages; |
1391 | while (pos != NULL) | 1393 | while (pos != NULL) |
1392 | { | 1394 | { |
1393 | queue_size++; | 1395 | queue_size++; |
1396 | tsize += pos->size; | ||
1394 | pos = pos->next; | 1397 | pos = pos->next; |
1395 | } | 1398 | } |
1396 | discard_low_prio = GNUNET_YES; | 1399 | discard_low_prio = GNUNET_YES; |
@@ -1518,8 +1521,10 @@ select_messages (struct Neighbour *n, | |||
1518 | } | 1521 | } |
1519 | #if DEBUG_CORE | 1522 | #if DEBUG_CORE |
1520 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1523 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1521 | "Selected %u bytes of plaintext messages for transmission to `%4s'.\n", | 1524 | "Selected %u/%u bytes of %u/%u plaintext messages for transmission to `%4s'.\n", |
1522 | off, GNUNET_i2s (&n->peer)); | 1525 | off, tsize, |
1526 | queue_size, MAX_PEER_QUEUE_SIZE, | ||
1527 | GNUNET_i2s (&n->peer)); | ||
1523 | #endif | 1528 | #endif |
1524 | return off; | 1529 | return off; |
1525 | } | 1530 | } |
@@ -2036,8 +2041,9 @@ handle_client_send (void *cls, | |||
2036 | 2041 | ||
2037 | #if DEBUG_CORE | 2042 | #if DEBUG_CORE |
2038 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2043 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2039 | "Adding transmission request for `%4s' to queue\n", | 2044 | "Adding transmission request for `%4s' of size %u to queue\n", |
2040 | GNUNET_i2s (&sm->peer)); | 2045 | GNUNET_i2s (&sm->peer), |
2046 | msize); | ||
2041 | #endif | 2047 | #endif |
2042 | e = GNUNET_malloc (sizeof (struct MessageEntry) + msize); | 2048 | e = GNUNET_malloc (sizeof (struct MessageEntry) + msize); |
2043 | e->deadline = GNUNET_TIME_absolute_ntoh (sm->deadline); | 2049 | e->deadline = GNUNET_TIME_absolute_ntoh (sm->deadline); |