Changed struct GNUNET_TIME_RelativeNBO
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 27 Oct 2010 11:41:46 +0000 (11:41 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 27 Oct 2010 11:41:46 +0000 (11:41 +0000)
src/core/gnunet-service-core.c
src/include/gnunet_time_lib.h
src/transport/Makefile.am
src/transport/gnunet-service-transport.c
src/transport/transport_api.c
src/util/time.c

index 16200c822f7997df4d6383930e90da5329153f63..4ab371a39fa6db688ccbd9459b422e21789a2af1 100644 (file)
@@ -2173,7 +2173,7 @@ process_plaintext_neighbour_queue (struct Neighbour *n)
 #if DEBUG_CORE_QUOTA
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Sending %u b/s as new limit to peer `%4s'\n",
-             (unsigned int) ntohl (n->bw_in.value__),
+             (unsigned int) ntohl (n->bw_in.rel_value__),
              GNUNET_i2s (&n->peer));
 #endif
   ph->iv_seed = htonl (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX));
@@ -3536,7 +3536,7 @@ handle_encrypted_message (struct Neighbour *n,
 #if DEBUG_CORE_SET_QUOTA
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Received %u b/s as new inbound limit for peer `%4s'\n",
-                 (unsigned int) ntohl (pt->inbound_bw_limit.value__),
+                 (unsigned int) ntohl (pt->inbound_bw_limit.rel_value__),
                  GNUNET_i2s (&n->peer));
 #endif
       n->bw_out_external_limit = pt->inbound_bw_limit;
@@ -3779,11 +3779,11 @@ neighbour_quota_update (void *cls,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Current quota for `%4s' is %u/%llu b/s in (old: %u b/s) / %u out (%u internal)\n",
              GNUNET_i2s (&n->peer),
-             (unsigned int) ntohl (q_in.value__),
+             (unsigned int) ntohl (q_in.rel_value__),
              bandwidth_target_out_bps,
-             (unsigned int) ntohl (n->bw_in.value__),
-             (unsigned int) ntohl (n->bw_out.value__),
-             (unsigned int) ntohl (n->bw_out_internal_limit.value__));
+             (unsigned int) ntohl (n->bw_in.rel_value__),
+             (unsigned int) ntohl (n->bw_out.rel_value__),
+             (unsigned int) ntohl (n->bw_out_internal_limit.rel_value__));
 #endif
   if (n->bw_in.value__ != q_in.value__) 
     {
index baebac92707a424b0b842fdc65ee87015095c7f2..1a23f1ac2ae56d0c813cedfd86afdc76c76e1055 100644 (file)
@@ -70,7 +70,7 @@ struct GNUNET_TIME_RelativeNBO
   /**
    * The actual value (in network byte order).
    */
-  uint64_t value__ GNUNET_PACKED;
+  uint64_t rel_value__ GNUNET_PACKED;
 };
 
 
index 4813946c7af053a7078e8a630cc69ea3e54184b1..0fbad27cef219f582fe2d2725d357e64737a1f3d 100644 (file)
@@ -200,8 +200,8 @@ check_PROGRAMS = \
  test_transport_api_reliability_tcp_nat \
  test_transport_api_reliability_udp \
  $(HTTP_REL_TEST) \
- $(HTTPS_REL_TEST) \
-  test_quota_compliance
+ $(HTTPS_REL_TEST)
+#  test_quota_compliance
 # TODO: add tests for nat, etc.
 
 if !DISABLE_TEST_RUN
index c1bb7bec6f79833b3477329f702252d74a0cc9ad..573f8ef9a7a4b8921bb1267916800a157562edfd 100644 (file)
@@ -5074,7 +5074,7 @@ handle_set_quota (void *cls,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Received `%s' request (new quota %u, old quota %u) from client for peer `%4s'\n",
               "SET_QUOTA",
-             (unsigned int) ntohl (qsm->quota.value__),
+             (unsigned int) ntohl (qsm->quota.rel_value__),
              (unsigned int) n->in_tracker.available_bytes_per_s__,
              GNUNET_i2s (&qsm->peer));
 #endif
index 53330d39ec64a413795137e7e756703c634ea7bd..ad81940ae456b7d0dd52e3ece199089dbbc8c1e7 100644 (file)
@@ -868,11 +868,11 @@ GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle,
   if (n != NULL)
     {
 #if DEBUG_TRANSPORT
-      if (ntohl (quota_out.value__) != n->out_tracker.available_bytes_per_s__)
+      if (ntohl (quota_out.rel_value__) != n->out_tracker.available_bytes_per_s__)
        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                    "Quota changed from %u to %u for peer `%s'\n",
                    (unsigned int) n->out_tracker.available_bytes_per_s__,
-                   (unsigned int) ntohl (quota_out.value__),
+                   (unsigned int) ntohl (quota_out.rel_value__),
                    GNUNET_i2s (target));
       else
        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -888,7 +888,7 @@ GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle,
 #if DEBUG_TRANSPORT
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Quota changed to %u for peer `%s', but I have no such neighbour!\n",
-                 (unsigned int) ntohl (quota_out.value__),
+                 (unsigned int) ntohl (quota_out.rel_value__),
                  GNUNET_i2s (target));
 #endif
     }
index d2e25d05965a3fddb3fff449fdd9aabaee91d954..0ab947b934454f4b91350e81151322d37ff03245 100644 (file)
@@ -426,7 +426,7 @@ struct GNUNET_TIME_RelativeNBO
 GNUNET_TIME_relative_hton (struct GNUNET_TIME_Relative a)
 {
   struct GNUNET_TIME_RelativeNBO ret;
-  ret.value__ = GNUNET_htonll (a.rel_value);
+  ret.rel_value__ = GNUNET_htonll (a.rel_value);
   return ret;
 }
 
@@ -440,7 +440,7 @@ struct GNUNET_TIME_Relative
 GNUNET_TIME_relative_ntoh (struct GNUNET_TIME_RelativeNBO a)
 {
   struct GNUNET_TIME_Relative ret;
-  ret.rel_value = GNUNET_ntohll (a.value__);
+  ret.rel_value = GNUNET_ntohll (a.rel_value__);
   return ret;
 
 }