aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-service-transport.c')
-rw-r--r--src/transport/gnunet-service-transport.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index a0568c855..ffe40f8c1 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -111,8 +111,6 @@ struct GNUNET_TIME_Relative hello_expiration;
111 */ 111 */
112static void 112static void
113transmit_our_hello (void *cls, const struct GNUNET_PeerIdentity *target, 113transmit_our_hello (void *cls, const struct GNUNET_PeerIdentity *target,
114 const struct GNUNET_ATS_Information *ats,
115 uint32_t ats_count,
116 const struct GNUNET_HELLO_Address *address, 114 const struct GNUNET_HELLO_Address *address,
117 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 115 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
118 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out) 116 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
@@ -499,17 +497,12 @@ ats_request_address_change (void *cls,
499static void 497static void
500neighbours_connect_notification (void *cls, 498neighbours_connect_notification (void *cls,
501 const struct GNUNET_PeerIdentity *peer, 499 const struct GNUNET_PeerIdentity *peer,
502 const struct GNUNET_ATS_Information *ats,
503 uint32_t ats_count,
504 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 500 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
505 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out) 501 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
506{ 502{
507 size_t len = 503 size_t len = sizeof (struct ConnectInfoMessage);
508 sizeof (struct ConnectInfoMessage) +
509 ats_count * sizeof (struct GNUNET_ATS_Information);
510 char buf[len] GNUNET_ALIGN; 504 char buf[len] GNUNET_ALIGN;
511 struct ConnectInfoMessage *connect_msg = (struct ConnectInfoMessage *) buf; 505 struct ConnectInfoMessage *connect_msg = (struct ConnectInfoMessage *) buf;
512 struct GNUNET_ATS_Information *ap;
513 506
514 connections++; 507 connections++;
515 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 508 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -518,12 +511,9 @@ neighbours_connect_notification (void *cls,
518 511
519 connect_msg->header.size = htons (sizeof (buf)); 512 connect_msg->header.size = htons (sizeof (buf));
520 connect_msg->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT); 513 connect_msg->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT);
521 connect_msg->ats_count = htonl (ats_count);
522 connect_msg->id = *peer; 514 connect_msg->id = *peer;
523 connect_msg->quota_in = bandwidth_in; 515 connect_msg->quota_in = bandwidth_in;
524 connect_msg->quota_out = bandwidth_out; 516 connect_msg->quota_out = bandwidth_out;
525 ap = (struct GNUNET_ATS_Information *) &connect_msg[1];
526 memcpy (ap, ats, ats_count * sizeof (struct GNUNET_ATS_Information));
527 GST_clients_broadcast (&connect_msg->header, GNUNET_NO); 517 GST_clients_broadcast (&connect_msg->header, GNUNET_NO);
528} 518}
529 519