diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-04-11 11:58:53 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-04-11 11:58:53 +0200 |
commit | 7fe5d70497352ea453289fc582089ac1c352204a (patch) | |
tree | 77d92749e873db84685e0a55be7f3574121b774b /src/namestore | |
parent | 3b08fb626321221061021032c4c00386a0600d3b (diff) | |
parent | a67848585975067e40846fef9cccf6e8a7cd5494 (diff) | |
download | gnunet-7fe5d70497352ea453289fc582089ac1c352204a.tar.gz gnunet-7fe5d70497352ea453289fc582089ac1c352204a.zip |
complete logic for incremental imports
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/gnunet-zoneimport.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/namestore/gnunet-zoneimport.c b/src/namestore/gnunet-zoneimport.c index 763a94c3a..493569bca 100644 --- a/src/namestore/gnunet-zoneimport.c +++ b/src/namestore/gnunet-zoneimport.c | |||
@@ -1093,8 +1093,25 @@ queue (const char *hostname) | |||
1093 | } | 1093 | } |
1094 | else | 1094 | else |
1095 | { | 1095 | { |
1096 | unsigned int rd_count = 0; | ||
1097 | |||
1098 | req->expires = GNUNET_TIME_UNIT_FOREVER_ABS; | ||
1099 | for (struct Record *rec = req->rec_head; | ||
1100 | NULL != rec; | ||
1101 | rec = rec->next) | ||
1102 | { | ||
1103 | struct GNUNET_TIME_Absolute at; | ||
1104 | |||
1105 | at.abs_value_us = rec->grd.expiration_time; | ||
1106 | req->expires = GNUNET_TIME_absolute_min (req->expires, | ||
1107 | at); | ||
1108 | rd_count++; | ||
1109 | } | ||
1110 | if (0 == rd_count) | ||
1111 | req->expires = GNUNET_TIME_UNIT_ZERO_ABS; | ||
1096 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 1112 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
1097 | "Succeeded hot-start with existing data for `%s'\n", | 1113 | "Hot-start with %u existing records for `%s'\n", |
1114 | rd_count, | ||
1098 | req->label); | 1115 | req->label); |
1099 | } | 1116 | } |
1100 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1117 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |