aboutsummaryrefslogtreecommitdiff
path: root/src/dns
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-11 21:21:56 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-11 21:21:56 +0000
commit3d7fefedc9ba60bd8e8448efe8b628446d958536 (patch)
tree61ce41a52cd6e7232cead77818ef265993b2427e /src/dns
parent4a0398474db197abed243a123fb971fbeeffab4b (diff)
downloadgnunet-3d7fefedc9ba60bd8e8448efe8b628446d958536.tar.gz
gnunet-3d7fefedc9ba60bd8e8448efe8b628446d958536.zip
changing time measurement from milliseconds to microseconds
Diffstat (limited to 'src/dns')
-rw-r--r--src/dns/dnsparser.c2
-rw-r--r--src/dns/dnsstub.c2
-rw-r--r--src/dns/gnunet-dns-monitor.c2
-rw-r--r--src/dns/plugin_block_dns.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/dns/dnsparser.c b/src/dns/dnsparser.c
index 6ddfebb11..18ef4c219 100644
--- a/src/dns/dnsparser.c
+++ b/src/dns/dnsparser.c
@@ -891,7 +891,7 @@ add_record (char *dst,
891 } 891 }
892 rl.type = htons (record->type); 892 rl.type = htons (record->type);
893 rl.class = htons (record->class); 893 rl.class = htons (record->class);
894 rl.ttl = htonl (GNUNET_TIME_absolute_get_remaining (record->expiration_time).rel_value / 1000); /* in seconds */ 894 rl.ttl = htonl (GNUNET_TIME_absolute_get_remaining (record->expiration_time).rel_value_us / 1000LL / 1000LL); /* in seconds */
895 rl.data_len = htons ((uint16_t) (pos - (*off + sizeof (struct record_line)))); 895 rl.data_len = htons ((uint16_t) (pos - (*off + sizeof (struct record_line))));
896 memcpy (&dst[*off], &rl, sizeof (struct record_line)); 896 memcpy (&dst[*off], &rl, sizeof (struct record_line));
897 *off = pos; 897 *off = pos;
diff --git a/src/dns/dnsstub.c b/src/dns/dnsstub.c
index 3b30d3e63..0e130a77f 100644
--- a/src/dns/dnsstub.c
+++ b/src/dns/dnsstub.c
@@ -447,7 +447,7 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs,
447 (0 != memcmp (&rs->addr, 447 (0 != memcmp (&rs->addr,
448 &addr, 448 &addr,
449 addrlen)) || 449 addrlen)) ||
450 (0 == GNUNET_TIME_absolute_get_remaining (rs->timeout).rel_value) ) 450 (0 == GNUNET_TIME_absolute_get_remaining (rs->timeout).rel_value_us) )
451 { 451 {
452 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 452 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
453 "Request timeout or invalid sender address; ignoring reply\n"); 453 "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 747a87556..ece96db71 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)
214 get_type (record->type), 214 get_type (record->type),
215 record->name, 215 record->name,
216 format, 216 format,
217 (unsigned int) (GNUNET_TIME_absolute_get_remaining (record->expiration_time).rel_value / 1000)); 217 (unsigned int) (GNUNET_TIME_absolute_get_remaining (record->expiration_time).rel_value_us / 1000LL / 1000LL));
218 GNUNET_free_non_null (tmp); 218 GNUNET_free_non_null (tmp);
219} 219}
220 220
diff --git a/src/dns/plugin_block_dns.c b/src/dns/plugin_block_dns.c
index d8f3cbb6f..58301e095 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,
87 87
88 if (0 == 88 if (0 ==
89 GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_ntoh 89 GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_ntoh
90 (rec->expiration_time)).rel_value) 90 (rec->expiration_time)).rel_value_us)
91 { 91 {
92 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "DNS-Block is invalid: Timeout\n"); 92 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "DNS-Block is invalid: Timeout\n");
93 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; 93 return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;