gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r18693 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r18693 - gnunet/src/fs
Date: Mon, 19 Dec 2011 16:59:48 +0100

Author: grothoff
Date: 2011-12-19 16:59:48 +0100 (Mon, 19 Dec 2011)
New Revision: 18693

Modified:
   gnunet/src/fs/gnunet-service-fs_pr.c
Log:
limit lifetime of migrated content to at most 1 year

Modified: gnunet/src/fs/gnunet-service-fs_pr.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pr.c        2011-12-19 15:52:21 UTC (rev 
18692)
+++ gnunet/src/fs/gnunet-service-fs_pr.c        2011-12-19 15:59:48 UTC (rev 
18693)
@@ -980,6 +980,9 @@
   memset (&prq, 0, sizeof (prq));
   prq.data = data;
   prq.expiration = exp;
+  /* do not allow migrated content to live longer than 1 year */
+  prq.expiration = GNUNET_TIME_absolute_min (GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_YEARS),
+                                            prq.expiration);
   prq.size = size;
   prq.type = type;
   process_reply (&prq, key, pr);
@@ -1463,6 +1466,9 @@
   dsize = msize - sizeof (struct PutMessage);
   type = ntohl (put->type);
   expiration = GNUNET_TIME_absolute_ntoh (put->expiration);
+  /* do not allow migrated content to live longer than 1 year */
+  expiration = GNUNET_TIME_absolute_min (GNUNET_TIME_relative_to_absolute 
(GNUNET_TIME_UNIT_YEARS),
+                                        expiration);
   if (type == GNUNET_BLOCK_TYPE_FS_ONDEMAND)
     return GNUNET_SYSERR;
   if (GNUNET_OK !=




reply via email to

[Prev in Thread] Current Thread [Next in Thread]