aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-10-27 11:41:46 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-10-27 11:41:46 +0000
commitabcc76b4f868ce6e8e8ff4b058c800ad1119474a (patch)
tree75da9807f86c1ba6deba9cf0ff8313b1f241e4f3 /src
parent666e63629635d497f469a14a5109575c5e38cf01 (diff)
downloadgnunet-abcc76b4f868ce6e8e8ff4b058c800ad1119474a.tar.gz
gnunet-abcc76b4f868ce6e8e8ff4b058c800ad1119474a.zip
Changed struct GNUNET_TIME_RelativeNBO
Diffstat (limited to 'src')
-rw-r--r--src/core/gnunet-service-core.c12
-rw-r--r--src/include/gnunet_time_lib.h2
-rw-r--r--src/transport/Makefile.am4
-rw-r--r--src/transport/gnunet-service-transport.c2
-rw-r--r--src/transport/transport_api.c6
-rw-r--r--src/util/time.c4
6 files changed, 15 insertions, 15 deletions
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index 16200c822..4ab371a39 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -2173,7 +2173,7 @@ process_plaintext_neighbour_queue (struct Neighbour *n)
2173#if DEBUG_CORE_QUOTA 2173#if DEBUG_CORE_QUOTA
2174 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2174 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2175 "Sending %u b/s as new limit to peer `%4s'\n", 2175 "Sending %u b/s as new limit to peer `%4s'\n",
2176 (unsigned int) ntohl (n->bw_in.value__), 2176 (unsigned int) ntohl (n->bw_in.rel_value__),
2177 GNUNET_i2s (&n->peer)); 2177 GNUNET_i2s (&n->peer));
2178#endif 2178#endif
2179 ph->iv_seed = htonl (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX)); 2179 ph->iv_seed = htonl (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX));
@@ -3536,7 +3536,7 @@ handle_encrypted_message (struct Neighbour *n,
3536#if DEBUG_CORE_SET_QUOTA 3536#if DEBUG_CORE_SET_QUOTA
3537 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3537 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3538 "Received %u b/s as new inbound limit for peer `%4s'\n", 3538 "Received %u b/s as new inbound limit for peer `%4s'\n",
3539 (unsigned int) ntohl (pt->inbound_bw_limit.value__), 3539 (unsigned int) ntohl (pt->inbound_bw_limit.rel_value__),
3540 GNUNET_i2s (&n->peer)); 3540 GNUNET_i2s (&n->peer));
3541#endif 3541#endif
3542 n->bw_out_external_limit = pt->inbound_bw_limit; 3542 n->bw_out_external_limit = pt->inbound_bw_limit;
@@ -3779,11 +3779,11 @@ neighbour_quota_update (void *cls,
3779 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3779 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3780 "Current quota for `%4s' is %u/%llu b/s in (old: %u b/s) / %u out (%u internal)\n", 3780 "Current quota for `%4s' is %u/%llu b/s in (old: %u b/s) / %u out (%u internal)\n",
3781 GNUNET_i2s (&n->peer), 3781 GNUNET_i2s (&n->peer),
3782 (unsigned int) ntohl (q_in.value__), 3782 (unsigned int) ntohl (q_in.rel_value__),
3783 bandwidth_target_out_bps, 3783 bandwidth_target_out_bps,
3784 (unsigned int) ntohl (n->bw_in.value__), 3784 (unsigned int) ntohl (n->bw_in.rel_value__),
3785 (unsigned int) ntohl (n->bw_out.value__), 3785 (unsigned int) ntohl (n->bw_out.rel_value__),
3786 (unsigned int) ntohl (n->bw_out_internal_limit.value__)); 3786 (unsigned int) ntohl (n->bw_out_internal_limit.rel_value__));
3787#endif 3787#endif
3788 if (n->bw_in.value__ != q_in.value__) 3788 if (n->bw_in.value__ != q_in.value__)
3789 { 3789 {
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h
index baebac927..1a23f1ac2 100644
--- a/src/include/gnunet_time_lib.h
+++ b/src/include/gnunet_time_lib.h
@@ -70,7 +70,7 @@ struct GNUNET_TIME_RelativeNBO
70 /** 70 /**
71 * The actual value (in network byte order). 71 * The actual value (in network byte order).
72 */ 72 */
73 uint64_t value__ GNUNET_PACKED; 73 uint64_t rel_value__ GNUNET_PACKED;
74}; 74};
75 75
76 76
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index 4813946c7..0fbad27ce 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -200,8 +200,8 @@ check_PROGRAMS = \
200 test_transport_api_reliability_tcp_nat \ 200 test_transport_api_reliability_tcp_nat \
201 test_transport_api_reliability_udp \ 201 test_transport_api_reliability_udp \
202 $(HTTP_REL_TEST) \ 202 $(HTTP_REL_TEST) \
203 $(HTTPS_REL_TEST) \ 203 $(HTTPS_REL_TEST)
204 test_quota_compliance 204# test_quota_compliance
205# TODO: add tests for nat, etc. 205# TODO: add tests for nat, etc.
206 206
207if !DISABLE_TEST_RUN 207if !DISABLE_TEST_RUN
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index c1bb7bec6..573f8ef9a 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -5074,7 +5074,7 @@ handle_set_quota (void *cls,
5074 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 5074 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
5075 "Received `%s' request (new quota %u, old quota %u) from client for peer `%4s'\n", 5075 "Received `%s' request (new quota %u, old quota %u) from client for peer `%4s'\n",
5076 "SET_QUOTA", 5076 "SET_QUOTA",
5077 (unsigned int) ntohl (qsm->quota.value__), 5077 (unsigned int) ntohl (qsm->quota.rel_value__),
5078 (unsigned int) n->in_tracker.available_bytes_per_s__, 5078 (unsigned int) n->in_tracker.available_bytes_per_s__,
5079 GNUNET_i2s (&qsm->peer)); 5079 GNUNET_i2s (&qsm->peer));
5080#endif 5080#endif
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index 53330d39e..ad81940ae 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -868,11 +868,11 @@ GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle,
868 if (n != NULL) 868 if (n != NULL)
869 { 869 {
870#if DEBUG_TRANSPORT 870#if DEBUG_TRANSPORT
871 if (ntohl (quota_out.value__) != n->out_tracker.available_bytes_per_s__) 871 if (ntohl (quota_out.rel_value__) != n->out_tracker.available_bytes_per_s__)
872 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 872 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
873 "Quota changed from %u to %u for peer `%s'\n", 873 "Quota changed from %u to %u for peer `%s'\n",
874 (unsigned int) n->out_tracker.available_bytes_per_s__, 874 (unsigned int) n->out_tracker.available_bytes_per_s__,
875 (unsigned int) ntohl (quota_out.value__), 875 (unsigned int) ntohl (quota_out.rel_value__),
876 GNUNET_i2s (target)); 876 GNUNET_i2s (target));
877 else 877 else
878 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 878 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -888,7 +888,7 @@ GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle,
888#if DEBUG_TRANSPORT 888#if DEBUG_TRANSPORT
889 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 889 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
890 "Quota changed to %u for peer `%s', but I have no such neighbour!\n", 890 "Quota changed to %u for peer `%s', but I have no such neighbour!\n",
891 (unsigned int) ntohl (quota_out.value__), 891 (unsigned int) ntohl (quota_out.rel_value__),
892 GNUNET_i2s (target)); 892 GNUNET_i2s (target));
893#endif 893#endif
894 } 894 }
diff --git a/src/util/time.c b/src/util/time.c
index d2e25d059..0ab947b93 100644
--- a/src/util/time.c
+++ b/src/util/time.c
@@ -426,7 +426,7 @@ struct GNUNET_TIME_RelativeNBO
426GNUNET_TIME_relative_hton (struct GNUNET_TIME_Relative a) 426GNUNET_TIME_relative_hton (struct GNUNET_TIME_Relative a)
427{ 427{
428 struct GNUNET_TIME_RelativeNBO ret; 428 struct GNUNET_TIME_RelativeNBO ret;
429 ret.value__ = GNUNET_htonll (a.rel_value); 429 ret.rel_value__ = GNUNET_htonll (a.rel_value);
430 return ret; 430 return ret;
431} 431}
432 432
@@ -440,7 +440,7 @@ struct GNUNET_TIME_Relative
440GNUNET_TIME_relative_ntoh (struct GNUNET_TIME_RelativeNBO a) 440GNUNET_TIME_relative_ntoh (struct GNUNET_TIME_RelativeNBO a)
441{ 441{
442 struct GNUNET_TIME_Relative ret; 442 struct GNUNET_TIME_Relative ret;
443 ret.rel_value = GNUNET_ntohll (a.value__); 443 ret.rel_value = GNUNET_ntohll (a.rel_value__);
444 return ret; 444 return ret;
445 445
446} 446}