diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-08-11 21:21:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-08-11 21:21:56 +0000 |
commit | 3d7fefedc9ba60bd8e8448efe8b628446d958536 (patch) | |
tree | 61ce41a52cd6e7232cead77818ef265993b2427e /src/dns | |
parent | 4a0398474db197abed243a123fb971fbeeffab4b (diff) |
changing time measurement from milliseconds to microseconds
Diffstat (limited to 'src/dns')
-rw-r--r-- | src/dns/dnsparser.c | 2 | ||||
-rw-r--r-- | src/dns/dnsstub.c | 2 | ||||
-rw-r--r-- | src/dns/gnunet-dns-monitor.c | 2 | ||||
-rw-r--r-- | src/dns/plugin_block_dns.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/dns/dnsparser.c b/src/dns/dnsparser.c index 6ddfebb11a..18ef4c2197 100644 --- a/src/dns/dnsparser.c +++ b/src/dns/dnsparser.c @@ -891,7 +891,7 @@ add_record (char *dst, } rl.type = htons (record->type); rl.class = htons (record->class); - rl.ttl = htonl (GNUNET_TIME_absolute_get_remaining (record->expiration_time).rel_value / 1000); /* in seconds */ + rl.ttl = htonl (GNUNET_TIME_absolute_get_remaining (record->expiration_time).rel_value_us / 1000LL / 1000LL); /* in seconds */ rl.data_len = htons ((uint16_t) (pos - (*off + sizeof (struct record_line)))); memcpy (&dst[*off], &rl, sizeof (struct record_line)); *off = pos; diff --git a/src/dns/dnsstub.c b/src/dns/dnsstub.c index 3b30d3e63a..0e130a77ff 100644 --- a/src/dns/dnsstub.c +++ b/src/dns/dnsstub.c @@ -447,7 +447,7 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs, (0 != memcmp (&rs->addr, &addr, addrlen)) || - (0 == GNUNET_TIME_absolute_get_remaining (rs->timeout).rel_value) ) + (0 == GNUNET_TIME_absolute_get_remaining (rs->timeout).rel_value_us) ) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Request timeout or invalid sender address; ignoring reply\n"); diff --git a/src/dns/gnunet-dns-monitor.c b/src/dns/gnunet-dns-monitor.c index 747a875567..ece96db714 100644 --- a/src/dns/gnunet-dns-monitor.c +++ b/src/dns/gnunet-dns-monitor.c @@ -214,7 +214,7 @@ display_record (const struct GNUNET_DNSPARSER_Record *record) get_type (record->type), record->name, format, - (unsigned int) (GNUNET_TIME_absolute_get_remaining (record->expiration_time).rel_value / 1000)); + (unsigned int) (GNUNET_TIME_absolute_get_remaining (record->expiration_time).rel_value_us / 1000LL / 1000LL)); GNUNET_free_non_null (tmp); } diff --git a/src/dns/plugin_block_dns.c b/src/dns/plugin_block_dns.c index d8f3cbb6f9..58301e095a 100644 --- a/src/dns/plugin_block_dns.c +++ b/src/dns/plugin_block_dns.c @@ -87,7 +87,7 @@ block_plugin_dns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, if (0 == GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_ntoh - (rec->expiration_time)).rel_value) + (rec->expiration_time)).rel_value_us) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "DNS-Block is invalid: Timeout\n"); return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; |