gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r10321 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r10321 - gnunet/src/transport
Date: Tue, 16 Feb 2010 10:31:45 +0100

Author: grothoff
Date: 2010-02-16 10:31:45 +0100 (Tue, 16 Feb 2010)
New Revision: 10321

Modified:
   gnunet/src/transport/gnunet-service-transport.c
   gnunet/src/transport/transport.h
Log:
stuff

Modified: gnunet/src/transport/gnunet-service-transport.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport.c     2010-02-16 09:25:37 UTC 
(rev 10320)
+++ gnunet/src/transport/gnunet-service-transport.c     2010-02-16 09:31:45 UTC 
(rev 10321)
@@ -2628,19 +2628,20 @@
       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)
             {

Modified: gnunet/src/transport/transport.h
===================================================================
--- gnunet/src/transport/transport.h    2010-02-16 09:25:37 UTC (rev 10320)
+++ gnunet/src/transport/transport.h    2010-02-16 09:31:45 UTC (rev 10321)
@@ -67,16 +67,16 @@
    */
   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 @@
 
 };
 
+
 /**
  * Message used to notify the transport API about a message
  * received from the network.  The actual message follows.
@@ -183,10 +184,10 @@
    */
   struct GNUNET_PeerIdentity peer;
 
-  /*
+  /**
    * Distance metric.
    */
-  uint16_t distance;
+  uint32_t distance;
 
 };
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]