gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r17301 - gnunet/src/core


From: gnunet
Subject: [GNUnet-SVN] r17301 - gnunet/src/core
Date: Mon, 10 Oct 2011 10:38:39 +0200

Author: grothoff
Date: 2011-10-10 10:38:39 +0200 (Mon, 10 Oct 2011)
New Revision: 17301

Modified:
   gnunet/src/core/core.h
   gnunet/src/core/core_api.c
   gnunet/src/core/gnunet-service-core_neighbours.c
   gnunet/src/core/gnunet-service-core_sessions.c
Log:
remove limit_outbound, DCE

Modified: gnunet/src/core/core.h
===================================================================
--- gnunet/src/core/core.h      2011-10-10 08:38:23 UTC (rev 17300)
+++ gnunet/src/core/core.h      2011-10-10 08:38:39 UTC (rev 17301)
@@ -255,11 +255,9 @@
   uint32_t rim_id GNUNET_PACKED;
 
   /**
-   * Limit the number of bytes of outbound traffic to this
-   * peer to at most the specified amount (naturally, the
-   * amount is also limited by the receiving peer).
+   * Reserved, always zero.
    */
-  struct GNUNET_BANDWIDTH_Value32NBO limit_outbound;
+  uint32_t reserved GNUNET_PACKED;
 
   /**
    * Number of bytes of inbound traffic to reserve, can

Modified: gnunet/src/core/core_api.c
===================================================================
--- gnunet/src/core/core_api.c  2011-10-10 08:38:23 UTC (rev 17300)
+++ gnunet/src/core/core_api.c  2011-10-10 08:38:39 UTC (rev 17301)
@@ -1722,7 +1722,7 @@
   rim->header.size = htons (sizeof (struct RequestInfoMessage));
   rim->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_REQUEST_INFO);
   rim->rim_id = htonl (pr->rim_id = h->rim_id_gen++);
-  rim->limit_outbound = GNUNET_BANDWIDTH_VALUE_MAX; // FIXME: remove entirely 
soon...
+  rim->reserved = htonl (0);
   rim->reserve_inbound = htonl (amount);
   rim->preference_change = GNUNET_htonll (preference);
   rim->peer = *peer;

Modified: gnunet/src/core/gnunet-service-core_neighbours.c
===================================================================
--- gnunet/src/core/gnunet-service-core_neighbours.c    2011-10-10 08:38:23 UTC 
(rev 17300)
+++ gnunet/src/core/gnunet-service-core_neighbours.c    2011-10-10 08:38:39 UTC 
(rev 17301)
@@ -116,11 +116,6 @@
   /**
    * Tracking bandwidth for sending to this peer.
    */
-  struct GNUNET_BANDWIDTH_Tracker available_send_window;
-
-  /**
-   * Tracking bandwidth for sending to this peer.
-   */
   struct GNUNET_BANDWIDTH_Tracker available_recv_window;
 
 };
@@ -251,7 +246,6 @@
   GNUNET_assert (size >= m->size);
   memcpy (cbuf, &m[1], m->size);
   ret = m->size;
-  GNUNET_BANDWIDTH_tracker_consume (&n->available_send_window, m->size);
 #if DEBUG_CORE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Copied message of type %u and size %u into transport buffer for 
`%4s'\n",
@@ -351,9 +345,6 @@
 #endif
   n = GNUNET_malloc (sizeof (struct Neighbour));
   n->peer = *peer;
-  GNUNET_BANDWIDTH_tracker_init (&n->available_send_window, 
-                                GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT,
-                                 MAX_WINDOW_TIME_S);
   GNUNET_BANDWIDTH_tracker_init (&n->available_recv_window, 
                                 GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT,
                                  MAX_WINDOW_TIME_S);

Modified: gnunet/src/core/gnunet-service-core_sessions.c
===================================================================
--- gnunet/src/core/gnunet-service-core_sessions.c      2011-10-10 08:38:23 UTC 
(rev 17300)
+++ gnunet/src/core/gnunet-service-core_sessions.c      2011-10-10 08:38:39 UTC 
(rev 17301)
@@ -122,27 +122,25 @@
   GNUNET_SCHEDULER_TaskIdentifier cork_task;
 
   /**
-   * Tracking bandwidth for sending to this peer.
-   * // FIXME: unused! should it be used?
-   */
-  struct GNUNET_BANDWIDTH_Tracker available_send_window;
-
-  /**
    * Tracking bandwidth for receiving from this peer.
    * // FIXME: need to set it!
    */
   struct GNUNET_BANDWIDTH_Tracker available_recv_window;
 
   /**
-   * Available bandwidth out for this peer (current target).
-   * // FIXME: check usage!
+   * Available bandwidth out for this peer (current target).  This
+   * value should be the 'MIN' of 'bw_out_internal_limit' and
+   * 'bw_out_external_limit'.
    */
   struct GNUNET_BANDWIDTH_Value32NBO bw_out;
 
   /**
    * Internal bandwidth limit set for this peer (initially typically
-   * set to "-1").  Actual "bw_out" is MIN of
+   * set to "MAX_INT").  Actual "bw_out" is MIN of
    * "bpm_out_internal_limit" and "bw_out_external_limit".
+   *
+   * 
+   *
    * // FIXME: check usage
    */
   struct GNUNET_BANDWIDTH_Value32NBO bw_out_internal_limit;
@@ -773,26 +771,6 @@
   }
 
   want_reserv = ntohl (rcm->reserve_inbound);
-  if (session->bw_out_internal_limit.value__ != rcm->limit_outbound.value__)
-  {
-    session->bw_out_internal_limit = rcm->limit_outbound;
-    if (session->bw_out.value__ !=
-       GNUNET_BANDWIDTH_value_min (session->bw_out_internal_limit,
-                                   session->bw_out_external_limit).value__)
-    {
-      session->bw_out =
-       GNUNET_BANDWIDTH_value_min (session->bw_out_internal_limit,
-                                   session->bw_out_external_limit);
-      GNUNET_BANDWIDTH_tracker_update_quota (&session->available_recv_window,
-                                            session->bw_out);
-#if 0
-      // FIXME: who does this?
-      GNUNET_TRANSPORT_set_quota (transport, &session->peer, 
-                                 session->bw_in, 
-                                 session->bw_out);
-#endif
-    }
-  }
   if (want_reserv < 0)
   {
     got_reserv = want_reserv;




reply via email to

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