[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r17189 - in gnunet/src: block include vpn
From: |
gnunet |
Subject: |
[GNUnet-SVN] r17189 - in gnunet/src: block include vpn |
Date: |
Wed, 5 Oct 2011 10:42:12 +0200 |
Author: grothoff
Date: 2011-10-05 10:42:12 +0200 (Wed, 05 Oct 2011)
New Revision: 17189
Modified:
gnunet/src/block/plugin_block_dns.c
gnunet/src/include/block_dns.h
gnunet/src/vpn/gnunet-service-dns.c
Log:
pack block, use big endian for time
Modified: gnunet/src/block/plugin_block_dns.c
===================================================================
--- gnunet/src/block/plugin_block_dns.c 2011-10-05 08:34:36 UTC (rev 17188)
+++ gnunet/src/block/plugin_block_dns.c 2011-10-05 08:42:12 UTC (rev 17189)
@@ -86,7 +86,7 @@
}
if (GNUNET_TIME_relative_get_zero ().rel_value ==
- GNUNET_TIME_absolute_get_remaining (rec->expiration_time).rel_value)
+ GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_ntoh
(rec->expiration_time)).rel_value)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "DNS-Block is invalid: Timeout\n");
return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
Modified: gnunet/src/include/block_dns.h
===================================================================
--- gnunet/src/include/block_dns.h 2011-10-05 08:34:36 UTC (rev 17188)
+++ gnunet/src/include/block_dns.h 2011-10-05 08:42:12 UTC (rev 17189)
@@ -39,23 +39,23 @@
* The descriptor for the service
* (a peer may provide more than one service)
*/
- GNUNET_HashCode service_descriptor;
+ GNUNET_HashCode service_descriptor GNUNET_PACKED;
/**
* When does this record expire?
*/
- struct GNUNET_TIME_Absolute expiration_time;
+ struct GNUNET_TIME_AbsoluteNBO expiration_time;
/**
* Four TCP and UDP-Ports that are used by this service, big endian format
*/
- uint64_t ports;
+ uint64_t ports GNUNET_PACKED;
/**
* What connection-types (UDP, TCP, ...) are supported by the service.
* Contains an 'enum GNUNET_DNS_ServiceTypes' in big endian format.
*/
- uint32_t service_type;
+ uint32_t service_type GNUNET_PACKED;
};
#endif
Modified: gnunet/src/vpn/gnunet-service-dns.c
===================================================================
--- gnunet/src/vpn/gnunet-service-dns.c 2011-10-05 08:34:36 UTC (rev 17188)
+++ gnunet/src/vpn/gnunet-service-dns.c 2011-10-05 08:42:12 UTC (rev 17189)
@@ -1238,8 +1238,8 @@
GNUNET_CRYPTO_rsa_key_get_public (my_private_key, &data.peer);
data.expiration_time =
- GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply
- (GNUNET_TIME_UNIT_HOURS, 2));
+ GNUNET_TIME_absolute_hton (GNUNET_TIME_relative_to_absolute
(GNUNET_TIME_relative_multiply
+
(GNUNET_TIME_UNIT_HOURS, 2)));
/* Sign the block */
if (GNUNET_OK !=
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r17189 - in gnunet/src: block include vpn,
gnunet <=