-LRN: Correct time == 0 handling:
authorChristian Grothoff <christian@grothoff.org>
Thu, 5 Jul 2012 07:58:57 +0000 (07:58 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 5 Jul 2012 07:58:57 +0000 (07:58 +0000)
commitc6c93706e12eeaa56f8f52c42bf8737424458c38
treeb53e4d8713ebd7a290f8241bb4d053a8b0b6c9d8
parent491bcd3a92a3585cbbe6a1aa59aae18bf141a7c5
-LRN:  Correct time == 0 handling:
  With logging in namespace comparison it is now clear to me that
deletion fails due to expiration times not being equal. And sure
enough, gnunet-namespace sets expiration to 0 when submitting a
template for seek-and-destroy. This patch:
  1) Changes gnunet-namespace to fail if the time is not absolute or
unspecified. If it's absolute, it's used as-is (hoping that the user
got the exact expiration time somewhere - probably from -D). If it's
unspecified, it is set to zero (as it was before).
  2) Comparison ignores expiration time if either of the arguments has
expiration time set to zero (i'm assuming that real records will never
have expiration time of zero. If it's absolute, zero is in the past.
If it's relative, zero makes no sense). Also, i'm not sure it makes
sense to have two records that have different expiration times, but
are otherwise identical (i.e. both are public or private, same data,
size etc). Lookups will find (and will be satisfied) by either, so
there's no sense in keeping both (unless you're doing some wizardry
with expirations, but i'm not sure it's worth the compexity).
src/namestore/gnunet-namestore.c
src/namestore/namestore_common.c