stuff
authorChristian Grothoff <christian@grothoff.org>
Tue, 16 Feb 2010 09:31:45 +0000 (09:31 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 16 Feb 2010 09:31:45 +0000 (09:31 +0000)
src/transport/gnunet-service-transport.c
src/transport/transport.h

index 4c94e293965fa0fb30c006435766bdb4721cc1e0..e2616f078b5618ae2c6b9a4ba93af3ee161a6314 100644 (file)
@@ -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)
             {
index 89f004ab810d99d22c0c3cada7d66050320fe15d..5e92bfb1ec7fd8ed41e5ceedd859b94ce78dc0d6 100644 (file)
@@ -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;
 
 };