[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: update counters properly
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: update counters properly |
Date: |
Fri, 24 Feb 2017 13:25:24 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 0f67fd7bc update counters properly
0f67fd7bc is described below
commit 0f67fd7bc65b07feceff790fb18e7e8a0aaeac69
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Feb 24 13:25:56 2017 +0100
update counters properly
---
src/cadet/gnunet-service-cadet-new_tunnels.c | 7 +++++++
src/transport/gnunet-service-transport_neighbours.c | 17 +++++++++--------
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/src/cadet/gnunet-service-cadet-new_tunnels.c
b/src/cadet/gnunet-service-cadet-new_tunnels.c
index af77ea067..05a1e071d 100644
--- a/src/cadet/gnunet-service-cadet-new_tunnels.c
+++ b/src/cadet/gnunet-service-cadet-new_tunnels.c
@@ -603,6 +603,7 @@ GCT_count_any_connections (const struct CadetTunnel *t)
static struct CadetTConnection *
get_ready_connection (struct CadetTunnel *t)
{
+ GNUNET_assert (GNUNET_YES == t->connection_ready_head->is_ready);
return t->connection_ready_head;
}
@@ -1971,13 +1972,19 @@ GCT_connection_lost (struct CadetTConnection *ct)
struct CadetTunnel *t = ct->t;
if (GNUNET_YES == ct->is_ready)
+ {
GNUNET_CONTAINER_DLL_remove (t->connection_ready_head,
t->connection_ready_tail,
ct);
+ t->num_ready_connections--;
+ }
else
+ {
GNUNET_CONTAINER_DLL_remove (t->connection_busy_head,
t->connection_busy_tail,
ct);
+ t->num_busy_connections--;
+ }
GNUNET_free (ct);
}
diff --git a/src/transport/gnunet-service-transport_neighbours.c
b/src/transport/gnunet-service-transport_neighbours.c
index 3952a728e..bbda715a2 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -1150,17 +1150,18 @@ set_incoming_quota (struct NeighbourMapEntry *n,
sqm.header.size = htons (sizeof (struct GNUNET_ATS_SessionQuotaMessage));
sqm.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_QUOTA);
sqm.quota = quota.value__;
- (void) send_with_session (n,
- &sqm,
- sizeof (sqm),
- UINT32_MAX - 1,
- GNUNET_TIME_UNIT_FOREVER_REL,
- GNUNET_NO,
- NULL, NULL);
+ if (NULL != n->primary_address.session)
+ (void) send_with_session (n,
+ &sqm,
+ sizeof (sqm),
+ UINT32_MAX - 1,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ GNUNET_NO,
+ NULL, NULL);
return;
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Disconnecting peer `%4s' due to SET_QUOTA\n",
+ "Disconnecting peer `%s' due to SET_QUOTA\n",
GNUNET_i2s (&n->id));
if (GNUNET_YES == test_connected (n))
GNUNET_STATISTICS_update (GST_stats,
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: update counters properly,
gnunet <=