[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22405 - gnunet/src/namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22405 - gnunet/src/namestore |
Date: |
Sat, 30 Jun 2012 00:12:43 +0200 |
Author: grothoff
Date: 2012-06-30 00:12:43 +0200 (Sat, 30 Jun 2012)
New Revision: 22405
Modified:
gnunet/src/namestore/gnunet-namestore.c
Log:
-display expiration times with records
Modified: gnunet/src/namestore/gnunet-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-namestore.c 2012-06-29 20:59:51 UTC (rev
22404)
+++ gnunet/src/namestore/gnunet-namestore.c 2012-06-29 22:12:43 UTC (rev
22405)
@@ -236,6 +236,9 @@
const char *typestring;
char *s;
unsigned int i;
+ char *etime;
+ struct GNUNET_TIME_Absolute aex;
+ struct GNUNET_TIME_Relative rex;
if (NULL == name)
{
@@ -260,7 +263,22 @@
(unsigned int) rd[i].record_type);
continue;
}
- FPRINTF (stdout, "\t%s: %s\n", typestring, s);
+ if (0 != (rd[i].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION))
+ {
+ rex.rel_value = rd[i].expiration_time;
+ etime = GNUNET_STRINGS_relative_time_to_string (rex);
+ }
+ else
+ {
+ aex.abs_value = rd[i].expiration_time;
+ etime = GNUNET_STRINGS_absolute_time_to_string (aex);
+ }
+ FPRINTF (stdout, "\t%s: %s (%s %s)\n", typestring, s,
+ (0 != (rd[i].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION))
+ ? _(/* what follows is relative expiration */ "for at least")
+ : _(/* what follows is absolute expiration */ "until"),
+ etime);
+ GNUNET_free (etime);
GNUNET_free (s);
}
FPRINTF (stdout, "%s", "\n");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22405 - gnunet/src/namestore,
gnunet <=