aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/transport/gnunet-service-transport.c1
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c3
-rw-r--r--src/transport/transport.h13
-rw-r--r--src/transport/transport_api_core.c5
4 files changed, 8 insertions, 14 deletions
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,
602 cim.header.size = htons (sizeof (struct ConnectInfoMessage)); 602 cim.header.size = htons (sizeof (struct ConnectInfoMessage));
603 cim.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT); 603 cim.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT);
604 cim.id = *peer; 604 cim.id = *peer;
605 cim.quota_in = bandwidth_in;
606 cim.quota_out = bandwidth_out; 605 cim.quota_out = bandwidth_out;
607 unicast (tc, 606 unicast (tc,
608 &cim.header, 607 &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 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
@@ -571,7 +571,6 @@ neighbours_connect_notification (struct NeighbourMapEntry *n)
571 connect_msg->header.size = htons (sizeof(buf)); 571 connect_msg->header.size = htons (sizeof(buf));
572 connect_msg->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT); 572 connect_msg->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT);
573 connect_msg->id = n->id; 573 connect_msg->id = n->id;
574 connect_msg->quota_in = n->primary_address.bandwidth_in;
575 connect_msg->quota_out = bandwidth_min; 574 connect_msg->quota_out = bandwidth_min;
576 GST_clients_broadcast (&connect_msg->header, 575 GST_clients_broadcast (&connect_msg->header,
577 GNUNET_NO); 576 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
121 struct GNUNET_MessageHeader header; 121 struct GNUNET_MessageHeader header;
122 122
123 /** 123 /**
124 * Identity of the new neighbour. 124 * Current outbound quota for this peer
125 */
126 struct GNUNET_PeerIdentity id;
127
128 /**
129 * Current inbound quota for this peer
130 */ 125 */
131 struct GNUNET_BANDWIDTH_Value32NBO quota_in; 126 struct GNUNET_BANDWIDTH_Value32NBO quota_out;
132 127
133 /** 128 /**
134 * Current outbound quota for this peer 129 * Identity of the new neighbour.
135 */ 130 */
136 struct GNUNET_BANDWIDTH_Value32NBO quota_out; 131 struct GNUNET_PeerIdentity id;
137}; 132};
138 133
139 134
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 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
@@ -551,7 +551,8 @@ handle_connect (void *cls,
551 "Receiving CONNECT message for `%s' with quota %u\n", 551 "Receiving CONNECT message for `%s' with quota %u\n",
552 GNUNET_i2s (&cim->id), 552 GNUNET_i2s (&cim->id),
553 ntohl (cim->quota_out.value__)); 553 ntohl (cim->quota_out.value__));
554 n = neighbour_find (h, &cim->id); 554 n = neighbour_find (h,
555 &cim->id);
555 if (NULL != n) 556 if (NULL != n)
556 { 557 {
557 GNUNET_break (0); 558 GNUNET_break (0);