summaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_neighbours.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-24 13:25:56 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-24 13:26:38 +0100
commit0f67fd7bc65b07feceff790fb18e7e8a0aaeac69 (patch)
tree50ef7b55ac0cc03b6bfc8dac5978328db2729db1 /src/transport/gnunet-service-transport_neighbours.c
parente86eed18860a354d1b224503a8f51c06c615e79d (diff)
update counters properly
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c17
1 files changed, 9 insertions, 8 deletions
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,