aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_uri.c
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/fs/fs_uri.c
parent4a0398474db197abed243a123fb971fbeeffab4b (diff)
downloadgnunet-3d7fefedc9ba60bd8e8448efe8b628446d958536.tar.gz
gnunet-3d7fefedc9ba60bd8e8448efe8b628446d958536.zip
changing time measurement from milliseconds to microseconds
Diffstat (limited to 'src/fs/fs_uri.c')
-rw-r--r--src/fs/fs_uri.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index e0bdc7ed6..6724dc625 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -638,7 +638,7 @@ uri_loc_parse (const char *s, char **emsg)
638 } 638 }
639 ass.purpose.size = htonl (sizeof (struct LocUriAssembly)); 639 ass.purpose.size = htonl (sizeof (struct LocUriAssembly));
640 ass.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT); 640 ass.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT);
641 et.abs_value = exptime; 641 et.abs_value_us = exptime * 1000LL * 1000LL;
642 ass.exptime = GNUNET_TIME_absolute_hton (et); 642 ass.exptime = GNUNET_TIME_absolute_hton (et);
643 if (GNUNET_OK != 643 if (GNUNET_OK !=
644 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT, 644 GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT,
@@ -2030,13 +2030,14 @@ uri_loc_to_string (const struct GNUNET_FS_Uri *uri)
2030 peerSig = 2030 peerSig =
2031 bin2enc (&uri->data.loc.contentSignature, 2031 bin2enc (&uri->data.loc.contentSignature,
2032 sizeof (struct GNUNET_CRYPTO_EccSignature)); 2032 sizeof (struct GNUNET_CRYPTO_EccSignature));
2033 GNUNET_asprintf (&ret, "%s%s%s.%s.%llu.%s.%s.%llu", GNUNET_FS_URI_PREFIX, 2033 GNUNET_asprintf (&ret,
2034 "%s%s%s.%s.%llu.%s.%s.%llu", GNUNET_FS_URI_PREFIX,
2034 GNUNET_FS_URI_LOC_INFIX, (const char *) &keyhash, 2035 GNUNET_FS_URI_LOC_INFIX, (const char *) &keyhash,
2035 (const char *) &queryhash, 2036 (const char *) &queryhash,
2036 (unsigned long long) GNUNET_ntohll (uri->data.loc. 2037 (unsigned long long) GNUNET_ntohll (uri->data.loc.
2037 fi.file_length), peerId, 2038 fi.file_length), peerId,
2038 peerSig, 2039 peerSig,
2039 (unsigned long long) uri->data.loc.expirationTime.abs_value); 2040 (unsigned long long) uri->data.loc.expirationTime.abs_value_us / 1000LL / 1000LL);
2040 GNUNET_free (peerSig); 2041 GNUNET_free (peerSig);
2041 GNUNET_free (peerId); 2042 GNUNET_free (peerId);
2042 return ret; 2043 return ret;