[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29836 - gnunet/src/namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29836 - gnunet/src/namestore |
Date: |
Fri, 4 Oct 2013 07:49:35 +0200 |
Author: grothoff
Date: 2013-10-04 07:49:34 +0200 (Fri, 04 Oct 2013)
New Revision: 29836
Modified:
gnunet/src/namestore/gnunet-namestore.c
gnunet/src/namestore/gnunet-service-namestore.c
gnunet/src/namestore/test_namestore_lookup.sh
Log:
-add logic to print expiration times for records
Modified: gnunet/src/namestore/gnunet-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-namestore.c 2013-10-04 05:35:17 UTC (rev
29835)
+++ gnunet/src/namestore/gnunet-namestore.c 2013-10-04 05:49:34 UTC (rev
29836)
@@ -326,6 +326,9 @@
const char *typestring;
char *s;
unsigned int i;
+ const char *ets;
+ struct GNUNET_TIME_Absolute at;
+ struct GNUNET_TIME_Relative rt;
if (NULL == name)
{
@@ -352,10 +355,21 @@
(unsigned int) rd[i].record_type);
continue;
}
+ if (0 != (rd[i].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION))
+ {
+ rt.rel_value_us = rd[i].expiration_time;
+ ets = GNUNET_STRINGS_relative_time_to_string (rt, GNUNET_YES);
+ }
+ else
+ {
+ at.abs_value_us = rd[i].expiration_time;
+ ets = GNUNET_STRINGS_absolute_time_to_string (at);
+ }
FPRINTF (stdout,
- "\t%s: %s\n",
+ "\t%s: %s (%s)\n",
typestring,
- s);
+ s,
+ ets);
GNUNET_free (s);
}
FPRINTF (stdout, "%s", "\n");
Modified: gnunet/src/namestore/gnunet-service-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-service-namestore.c 2013-10-04 05:35:17 UTC
(rev 29835)
+++ gnunet/src/namestore/gnunet-service-namestore.c 2013-10-04 05:49:34 UTC
(rev 29836)
@@ -443,7 +443,7 @@
* Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_BLOCK_CACHE message
*
* @param cls unused
- * @param client GNUNET_SERVER_Client sending the message
+ * @param client client sending the message
* @param message message of type 'struct BlockCacheMessage'
*/
static void
Modified: gnunet/src/namestore/test_namestore_lookup.sh
===================================================================
--- gnunet/src/namestore/test_namestore_lookup.sh 2013-10-04 05:35:17 UTC
(rev 29835)
+++ gnunet/src/namestore/test_namestore_lookup.sh 2013-10-04 05:49:34 UTC
(rev 29836)
@@ -3,7 +3,6 @@
trap "gnunet-arm -e -c $CONFIGURATION" SIGINT
rm -rf `gnunet-config -c $CONFIGURATION -s PATHS -o SERVICEHOME`
TEST_IP_PLUS="127.0.0.1"
-TEST_RECORD_NAME_PLUS="www"
TEST_RECORD_NAME_DNS="www3"
which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29836 - gnunet/src/namestore,
gnunet <=