From: Christian Grothoff Date: Tue, 16 Feb 2010 09:31:45 +0000 (+0000) Subject: stuff X-Git-Tag: initial-import-from-subversion-38251~22713 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7078248ddac81505a639501453baaf2bb9ddb82c;p=oweals%2Fgnunet.git stuff --- diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 4c94e2939..e2616f078 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -2628,19 +2628,20 @@ handle_start (void *cls, cim.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT); cim.quota_out = htonl (GNUNET_CONSTANTS_DEFAULT_BPM_IN_OUT / (60 * 1000)); - cim.latency = GNUNET_TIME_relative_hton (GNUNET_TIME_UNIT_ZERO); /* FIXME? */ + /* FIXME: this ACK stuff is not nice! */ im = GNUNET_malloc (sizeof (struct InboundMessage) + sizeof (struct GNUNET_MessageHeader)); im->header.size = htons (sizeof (struct InboundMessage) + sizeof (struct GNUNET_MessageHeader)); im->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_RECV); - im->latency = GNUNET_TIME_relative_hton (GNUNET_TIME_UNIT_ZERO); /* FIXME? */ + im->latency = GNUNET_TIME_relative_hton (GNUNET_TIME_UNIT_ZERO); ack = (struct GNUNET_MessageHeader *) &im[1]; ack->size = htons (sizeof (struct GNUNET_MessageHeader)); ack->type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_ACK); for (n = neighbors; n != NULL; n = n->next) { cim.id = n->id; + cim.latency = GNUNET_TIME_relative_hton (n->latency); transmit_to_client (c, &cim.header, GNUNET_NO); if (n->received_pong) { diff --git a/src/transport/transport.h b/src/transport/transport.h index 89f004ab8..5e92bfb1e 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h @@ -67,16 +67,16 @@ struct ConnectInfoMessage */ struct GNUNET_TIME_RelativeNBO latency; - /* - * Transport distance metric (i.e. hops for DV) - */ - uint16_t distance; - /** * Identity of the new neighbour. */ struct GNUNET_PeerIdentity id; + /** + * Transport distance metric (i.e. hops for DV) + */ + uint32_t distance; + }; @@ -156,6 +156,7 @@ struct TryConnectMessage }; + /** * Message used to notify the transport API about a message * received from the network. The actual message follows. @@ -183,10 +184,10 @@ struct InboundMessage */ struct GNUNET_PeerIdentity peer; - /* + /** * Distance metric. */ - uint16_t distance; + uint32_t distance; };