aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-10-27 09:41:28 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-10-27 09:41:28 +0000
commit4d14bcd5d233c1aeef03b34ec9d4b875a5d7bd2b (patch)
treee2724ae2693915295cee6ead1b54e2441cca4e7d /src
parent6cccd878eeab34115d87b75fa018582422f04dd4 (diff)
downloadgnunet-4d14bcd5d233c1aeef03b34ec9d4b875a5d7bd2b.tar.gz
gnunet-4d14bcd5d233c1aeef03b34ec9d4b875a5d7bd2b.zip
Refactoring gnunet time
Diffstat (limited to 'src')
-rw-r--r--src/dv/gnunet-service-dv.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c
index 6c7795302..c9360fbb4 100644
--- a/src/dv/gnunet-service-dv.c
+++ b/src/dv/gnunet-service-dv.c
@@ -1505,7 +1505,7 @@ static int handle_dv_data_message (void *cls,
1505#endif 1505#endif
1506 1506
1507#if DELAY_FORWARDS 1507#if DELAY_FORWARDS
1508 if (GNUNET_TIME_absolute_get_duration(pos->last_gossip).value < GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 2).value) 1508 if (GNUNET_TIME_absolute_get_duration(pos->last_gossip).abs_value < GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 2).abs_value)
1509 { 1509 {
1510 delayed_context = GNUNET_malloc(sizeof(struct DelayedMessageContext)); 1510 delayed_context = GNUNET_malloc(sizeof(struct DelayedMessageContext));
1511 memcpy(&delayed_context->dest, destination, sizeof(struct GNUNET_PeerIdentity)); 1511 memcpy(&delayed_context->dest, destination, sizeof(struct GNUNET_PeerIdentity));
@@ -1555,9 +1555,9 @@ static int handle_dv_data_message (void *cls,
1555 */ 1555 */
1556int print_neighbors (void *cls, 1556int print_neighbors (void *cls,
1557 const GNUNET_HashCode * key, 1557 const GNUNET_HashCode * key,
1558 void *value) 1558 void *abs_value)
1559{ 1559{
1560 struct DistantNeighbor *distant_neighbor = value; 1560 struct DistantNeighbor *distant_neighbor = abs_value;
1561 char my_shortname[5]; 1561 char my_shortname[5];
1562 char referrer_shortname[5]; 1562 char referrer_shortname[5];
1563 memcpy(&my_shortname, GNUNET_i2s(&my_identity), 4); 1563 memcpy(&my_shortname, GNUNET_i2s(&my_identity), 4);
@@ -1732,10 +1732,10 @@ handle_start (void *cls,
1732 */ 1732 */
1733int send_iterator (void *cls, 1733int send_iterator (void *cls,
1734 const GNUNET_HashCode * key, 1734 const GNUNET_HashCode * key,
1735 void *value) 1735 void *abs_value)
1736{ 1736{
1737 struct DV_SendContext *send_context = cls; 1737 struct DV_SendContext *send_context = cls;
1738 struct DistantNeighbor *distant_neighbor = value; 1738 struct DistantNeighbor *distant_neighbor = abs_value;
1739 1739
1740 if (memcmp(distant_neighbor->referrer, send_context->direct_peer, sizeof(struct GNUNET_PeerIdentity)) == 0) /* They match, send and free */ 1740 if (memcmp(distant_neighbor->referrer, send_context->direct_peer, sizeof(struct GNUNET_PeerIdentity)) == 0) /* They match, send and free */
1741 { 1741 {
@@ -2159,10 +2159,10 @@ void core_init (void *cls,
2159 */ 2159 */
2160static int add_pkey_to_extended (void *cls, 2160static int add_pkey_to_extended (void *cls,
2161 const GNUNET_HashCode * key, 2161 const GNUNET_HashCode * key,
2162 void *value) 2162 void *abs_value)
2163{ 2163{
2164 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pkey = cls; 2164 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pkey = cls;
2165 struct DistantNeighbor *distant_neighbor = value; 2165 struct DistantNeighbor *distant_neighbor = abs_value;
2166 2166
2167 if (distant_neighbor->pkey == NULL) 2167 if (distant_neighbor->pkey == NULL)
2168 { 2168 {
@@ -2665,9 +2665,9 @@ static int add_all_extended_peers (void *cls,
2665 */ 2665 */
2666static int gossip_all_to_all_iterator (void *cls, 2666static int gossip_all_to_all_iterator (void *cls,
2667 const GNUNET_HashCode * key, 2667 const GNUNET_HashCode * key,
2668 void *value) 2668 void *abs_value)
2669{ 2669{
2670 struct DirectNeighbor *direct = value; 2670 struct DirectNeighbor *direct = abs_value;
2671 2671
2672 GNUNET_CONTAINER_multihashmap_iterate (extended_neighbors, &add_all_extended_peers, direct->send_context); 2672 GNUNET_CONTAINER_multihashmap_iterate (extended_neighbors, &add_all_extended_peers, direct->send_context);
2673 2673