diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-10-27 12:38:51 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-10-27 12:38:51 +0000 |
commit | 8a52fcaa55bc547321ef779c6e9bb1672dd83585 (patch) | |
tree | d818553fd22633d804a769db9e565718b977fc53 /src | |
parent | abcc76b4f868ce6e8e8ff4b058c800ad1119474a (diff) | |
download | gnunet-8a52fcaa55bc547321ef779c6e9bb1672dd83585.tar.gz gnunet-8a52fcaa55bc547321ef779c6e9bb1672dd83585.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/gnunet-service-core.c | 2 | ||||
-rw-r--r-- | src/datacache/plugin_datacache_postgres.c | 2 | ||||
-rw-r--r-- | src/datastore/plugin_datastore_postgres.c | 6 | ||||
-rw-r--r-- | src/include/gnunet_time_lib.h | 2 | ||||
-rw-r--r-- | src/transport/Makefile.am | 4 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport.c | 2 | ||||
-rw-r--r-- | src/util/time.c | 4 |
7 files changed, 11 insertions, 11 deletions
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 4ab371a39..4f650b909 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.rel_value__), | 2176 | (unsigned int) ntohl (n->bw_in.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)); |
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c index ca794ddd4..75d644da9 100644 --- a/src/datacache/plugin_datacache_postgres.c +++ b/src/datacache/plugin_datacache_postgres.c | |||
@@ -312,7 +312,7 @@ postgres_plugin_put (void *cls, | |||
312 | struct Plugin *plugin = cls; | 312 | struct Plugin *plugin = cls; |
313 | PGresult *ret; | 313 | PGresult *ret; |
314 | uint32_t btype = htonl (type); | 314 | uint32_t btype = htonl (type); |
315 | uint64_t bexpi = GNUNET_TIME_absolute_hton (discard_time).value__; | 315 | uint64_t bexpi = GNUNET_TIME_absolute_hton (discard_time).abs_value__; |
316 | const char *paramValues[] = { | 316 | const char *paramValues[] = { |
317 | (const char *) &btype, | 317 | (const char *) &btype, |
318 | (const char *) &bexpi, | 318 | (const char *) &bexpi, |
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c index 248fe7a96..44a01fcb8 100644 --- a/src/datastore/plugin_datastore_postgres.c +++ b/src/datastore/plugin_datastore_postgres.c | |||
@@ -605,7 +605,7 @@ postgres_plugin_put (void *cls, | |||
605 | uint32_t btype = htonl (type); | 605 | uint32_t btype = htonl (type); |
606 | uint32_t bprio = htonl (priority); | 606 | uint32_t bprio = htonl (priority); |
607 | uint32_t banon = htonl (anonymity); | 607 | uint32_t banon = htonl (anonymity); |
608 | uint64_t bexpi = GNUNET_TIME_absolute_hton (expiration).value__; | 608 | uint64_t bexpi = GNUNET_TIME_absolute_hton (expiration).abs_value__; |
609 | const char *paramValues[] = { | 609 | const char *paramValues[] = { |
610 | (const char *) &btype, | 610 | (const char *) &btype, |
611 | (const char *) &bprio, | 611 | (const char *) &bprio, |
@@ -886,7 +886,7 @@ postgres_plugin_update (void *cls, | |||
886 | PGresult *ret; | 886 | PGresult *ret; |
887 | int32_t bdelta = (int32_t) htonl ((uint32_t) delta); | 887 | int32_t bdelta = (int32_t) htonl ((uint32_t) delta); |
888 | uint32_t boid = htonl ( (uint32_t) uid); | 888 | uint32_t boid = htonl ( (uint32_t) uid); |
889 | uint64_t bexpire = GNUNET_TIME_absolute_hton (expire).value__; | 889 | uint64_t bexpire = GNUNET_TIME_absolute_hton (expire).abs_value__; |
890 | const char *paramValues[] = { | 890 | const char *paramValues[] = { |
891 | (const char *) &bdelta, | 891 | (const char *) &bdelta, |
892 | (const char *) &bexpire, | 892 | (const char *) &bexpire, |
@@ -996,7 +996,7 @@ postgres_iterate (struct Plugin *plugin, | |||
996 | GNUNET_free (nrc); | 996 | GNUNET_free (nrc); |
997 | return; | 997 | return; |
998 | } | 998 | } |
999 | nrc->bnow = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()).value__; | 999 | nrc->bnow = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()).abs_value__; |
1000 | postgres_plugin_next_request (nrc, | 1000 | postgres_plugin_next_request (nrc, |
1001 | GNUNET_NO); | 1001 | GNUNET_NO); |
1002 | } | 1002 | } |
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h index 1a23f1ac2..4f0b3b74c 100644 --- a/src/include/gnunet_time_lib.h +++ b/src/include/gnunet_time_lib.h | |||
@@ -82,7 +82,7 @@ struct GNUNET_TIME_AbsoluteNBO | |||
82 | /** | 82 | /** |
83 | * The actual value (in network byte order). | 83 | * The actual value (in network byte order). |
84 | */ | 84 | */ |
85 | uint64_t value__ GNUNET_PACKED; | 85 | uint64_t abs_value__ GNUNET_PACKED; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | 88 | ||
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 0fbad27ce..3fae21572 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 | ||
207 | if !DISABLE_TEST_RUN | 207 | if !DISABLE_TEST_RUN |
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 573f8ef9a..c1bb7bec6 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.rel_value__), | 5077 | (unsigned int) ntohl (qsm->quota.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/util/time.c b/src/util/time.c index 0ab947b93..e1440f260 100644 --- a/src/util/time.c +++ b/src/util/time.c | |||
@@ -455,7 +455,7 @@ struct GNUNET_TIME_AbsoluteNBO | |||
455 | GNUNET_TIME_absolute_hton (struct GNUNET_TIME_Absolute a) | 455 | GNUNET_TIME_absolute_hton (struct GNUNET_TIME_Absolute a) |
456 | { | 456 | { |
457 | struct GNUNET_TIME_AbsoluteNBO ret; | 457 | struct GNUNET_TIME_AbsoluteNBO ret; |
458 | ret.value__ = GNUNET_htonll (a.abs_value); | 458 | ret.abs_value__ = GNUNET_htonll (a.abs_value); |
459 | return ret; | 459 | return ret; |
460 | } | 460 | } |
461 | 461 | ||
@@ -469,7 +469,7 @@ struct GNUNET_TIME_Absolute | |||
469 | GNUNET_TIME_absolute_ntoh (struct GNUNET_TIME_AbsoluteNBO a) | 469 | GNUNET_TIME_absolute_ntoh (struct GNUNET_TIME_AbsoluteNBO a) |
470 | { | 470 | { |
471 | struct GNUNET_TIME_Absolute ret; | 471 | struct GNUNET_TIME_Absolute ret; |
472 | ret.abs_value = GNUNET_ntohll (a.value__); | 472 | ret.abs_value = GNUNET_ntohll (a.abs_value__); |
473 | return ret; | 473 | return ret; |
474 | 474 | ||
475 | } | 475 | } |