From 3d7fefedc9ba60bd8e8448efe8b628446d958536 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 11 Aug 2013 21:21:56 +0000 Subject: changing time measurement from milliseconds to microseconds --- src/fs/fs_uri.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/fs/fs_uri.c') 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) } ass.purpose.size = htonl (sizeof (struct LocUriAssembly)); ass.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT); - et.abs_value = exptime; + et.abs_value_us = exptime * 1000LL * 1000LL; ass.exptime = GNUNET_TIME_absolute_hton (et); if (GNUNET_OK != GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT, @@ -2030,13 +2030,14 @@ uri_loc_to_string (const struct GNUNET_FS_Uri *uri) peerSig = bin2enc (&uri->data.loc.contentSignature, sizeof (struct GNUNET_CRYPTO_EccSignature)); - GNUNET_asprintf (&ret, "%s%s%s.%s.%llu.%s.%s.%llu", GNUNET_FS_URI_PREFIX, + GNUNET_asprintf (&ret, + "%s%s%s.%s.%llu.%s.%s.%llu", GNUNET_FS_URI_PREFIX, GNUNET_FS_URI_LOC_INFIX, (const char *) &keyhash, (const char *) &queryhash, (unsigned long long) GNUNET_ntohll (uri->data.loc. fi.file_length), peerId, peerSig, - (unsigned long long) uri->data.loc.expirationTime.abs_value); + (unsigned long long) uri->data.loc.expirationTime.abs_value_us / 1000LL / 1000LL); GNUNET_free (peerSig); GNUNET_free (peerId); return ret; -- cgit v1.2.3