[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31601 - gnunet/src/gnsrecord
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31601 - gnunet/src/gnsrecord |
Date: |
Fri, 20 Dec 2013 13:10:14 +0100 |
Author: grothoff
Date: 2013-12-20 13:10:14 +0100 (Fri, 20 Dec 2013)
New Revision: 31601
Modified:
gnunet/src/gnsrecord/gnsrecord_crypto.c
Log:
-undo, rd[i].expiration time are in host-byte-order
Modified: gnunet/src/gnsrecord/gnsrecord_crypto.c
===================================================================
--- gnunet/src/gnsrecord/gnsrecord_crypto.c 2013-12-20 11:22:25 UTC (rev
31600)
+++ gnunet/src/gnsrecord/gnsrecord_crypto.c 2013-12-20 12:10:14 UTC (rev
31601)
@@ -187,7 +187,6 @@
GNUNET_GNSRECORD_RecordCallback proc,
void *proc_cls)
{
- struct GNUNET_TIME_Absolute exp;
size_t payload_len = ntohl (block->purpose.size) -
sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) -
sizeof (struct GNUNET_TIME_AbsoluteNBO);
@@ -250,7 +249,6 @@
continue;
}
- exp.abs_value_us = GNUNET_ntohll (rd[i].expiration_time);
if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_SHADOW_RECORD))
{
int include_record = GNUNET_YES;
@@ -259,12 +257,10 @@
{
if (k == i)
continue;
- if (exp.abs_value_us < now.abs_value_us)
- {
+ if (rd[i].expiration_time < now.abs_value_us)
include_record = GNUNET_NO; /* Shadow record is expired */
- }
if ((rd[k].record_type == rd[i].record_type)
- && (GNUNET_ntohll (rd[k].expiration_time) >= now.abs_value_us)
+ && (rd[k].expiration_time >= now.abs_value_us)
&& (0 == (rd[k].flags & GNUNET_GNSRECORD_RF_SHADOW_RECORD)))
include_record = GNUNET_NO; /* We have a non-expired, non-shadow
record of the same type */
}
@@ -276,7 +272,7 @@
j++;
}
}
- else if (exp.abs_value_us >= now.abs_value_us)
+ else if (rd[i].expiration_time >= now.abs_value_us)
{
/* Include this record */
if (j != i)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31601 - gnunet/src/gnsrecord,
gnunet <=