From 196a0bf9699d9ecead4b50819bd64d3174795296 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 15 Nov 2018 23:26:24 +0100 Subject: remove dead field quota_in --- src/transport/gnunet-service-transport.c | 1 - src/transport/gnunet-service-transport_neighbours.c | 3 +-- src/transport/transport.h | 13 ++++--------- src/transport/transport_api_core.c | 5 +++-- 4 files changed, 8 insertions(+), 14 deletions(-) (limited to 'src/transport') diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 8c4f33fd0..2d9803651 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -602,7 +602,6 @@ notify_client_about_neighbour (void *cls, cim.header.size = htons (sizeof (struct ConnectInfoMessage)); cim.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT); cim.id = *peer; - cim.quota_in = bandwidth_in; cim.quota_out = bandwidth_out; unicast (tc, &cim.header, diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 3965bc13e..68344bcf4 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c @@ -11,7 +11,7 @@ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ @@ -571,7 +571,6 @@ neighbours_connect_notification (struct NeighbourMapEntry *n) connect_msg->header.size = htons (sizeof(buf)); connect_msg->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT); connect_msg->id = n->id; - connect_msg->quota_in = n->primary_address.bandwidth_in; connect_msg->quota_out = bandwidth_min; GST_clients_broadcast (&connect_msg->header, GNUNET_NO); diff --git a/src/transport/transport.h b/src/transport/transport.h index c5191a5ce..129b1ce15 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h @@ -121,19 +121,14 @@ struct ConnectInfoMessage struct GNUNET_MessageHeader header; /** - * Identity of the new neighbour. - */ - struct GNUNET_PeerIdentity id; - - /** - * Current inbound quota for this peer + * Current outbound quota for this peer */ - struct GNUNET_BANDWIDTH_Value32NBO quota_in; + struct GNUNET_BANDWIDTH_Value32NBO quota_out; /** - * Current outbound quota for this peer + * Identity of the new neighbour. */ - struct GNUNET_BANDWIDTH_Value32NBO quota_out; + struct GNUNET_PeerIdentity id; }; diff --git a/src/transport/transport_api_core.c b/src/transport/transport_api_core.c index 5310054fd..2e897d94a 100644 --- a/src/transport/transport_api_core.c +++ b/src/transport/transport_api_core.c @@ -11,7 +11,7 @@ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ @@ -551,7 +551,8 @@ handle_connect (void *cls, "Receiving CONNECT message for `%s' with quota %u\n", GNUNET_i2s (&cim->id), ntohl (cim->quota_out.value__)); - n = neighbour_find (h, &cim->id); + n = neighbour_find (h, + &cim->id); if (NULL != n) { GNUNET_break (0); -- cgit v1.2.3