diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-24 13:25:56 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-24 13:26:38 +0100 |
commit | 0f67fd7bc65b07feceff790fb18e7e8a0aaeac69 (patch) | |
tree | 50ef7b55ac0cc03b6bfc8dac5978328db2729db1 /src/transport/gnunet-service-transport_neighbours.c | |
parent | e86eed18860a354d1b224503a8f51c06c615e79d (diff) | |
download | gnunet-0f67fd7bc65b07feceff790fb18e7e8a0aaeac69.tar.gz gnunet-0f67fd7bc65b07feceff790fb18e7e8a0aaeac69.zip |
update counters properly
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.c')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 17 |
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, | |||
1150 | sqm.header.size = htons (sizeof (struct GNUNET_ATS_SessionQuotaMessage)); | 1150 | sqm.header.size = htons (sizeof (struct GNUNET_ATS_SessionQuotaMessage)); |
1151 | sqm.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_QUOTA); | 1151 | sqm.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_QUOTA); |
1152 | sqm.quota = quota.value__; | 1152 | sqm.quota = quota.value__; |
1153 | (void) send_with_session (n, | 1153 | if (NULL != n->primary_address.session) |
1154 | &sqm, | 1154 | (void) send_with_session (n, |
1155 | sizeof (sqm), | 1155 | &sqm, |
1156 | UINT32_MAX - 1, | 1156 | sizeof (sqm), |
1157 | GNUNET_TIME_UNIT_FOREVER_REL, | 1157 | UINT32_MAX - 1, |
1158 | GNUNET_NO, | 1158 | GNUNET_TIME_UNIT_FOREVER_REL, |
1159 | NULL, NULL); | 1159 | GNUNET_NO, |
1160 | NULL, NULL); | ||
1160 | return; | 1161 | return; |
1161 | } | 1162 | } |
1162 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 1163 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
1163 | "Disconnecting peer `%4s' due to SET_QUOTA\n", | 1164 | "Disconnecting peer `%s' due to SET_QUOTA\n", |
1164 | GNUNET_i2s (&n->id)); | 1165 | GNUNET_i2s (&n->id)); |
1165 | if (GNUNET_YES == test_connected (n)) | 1166 | if (GNUNET_YES == test_connected (n)) |
1166 | GNUNET_STATISTICS_update (GST_stats, | 1167 | GNUNET_STATISTICS_update (GST_stats, |