aboutsummaryrefslogtreecommitdiff
path: root/src/gnsrecord
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-04-23 15:59:03 +0200
committerChristian Grothoff <christian@grothoff.org>2018-04-23 15:59:03 +0200
commit08795cc18190529e28a4ccc54e225534f55ed209 (patch)
tree992187d21a4ce155facd3fc5a8d2cb5860ced164 /src/gnsrecord
parent3e2b9dc6d520b6be53a3c41a112f224df12d9f99 (diff)
downloadgnunet-08795cc18190529e28a4ccc54e225534f55ed209.tar.gz
gnunet-08795cc18190529e28a4ccc54e225534f55ed209.zip
fix transition to multi-server in cmd line for gnunet-zoneimport
Diffstat (limited to 'src/gnsrecord')
-rw-r--r--src/gnsrecord/gnsrecord_misc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c
index 3c1ead437..05f56cf70 100644
--- a/src/gnsrecord/gnsrecord_misc.c
+++ b/src/gnsrecord/gnsrecord_misc.c
@@ -152,8 +152,6 @@ struct GNUNET_TIME_Absolute
152GNUNET_GNSRECORD_record_get_expiration_time (unsigned int rd_count, 152GNUNET_GNSRECORD_record_get_expiration_time (unsigned int rd_count,
153 const struct GNUNET_GNSRECORD_Data *rd) 153 const struct GNUNET_GNSRECORD_Data *rd)
154{ 154{
155 unsigned int c;
156 unsigned int c2;
157 struct GNUNET_TIME_Absolute expire; 155 struct GNUNET_TIME_Absolute expire;
158 struct GNUNET_TIME_Absolute at; 156 struct GNUNET_TIME_Absolute at;
159 struct GNUNET_TIME_Relative rt; 157 struct GNUNET_TIME_Relative rt;
@@ -163,7 +161,7 @@ GNUNET_GNSRECORD_record_get_expiration_time (unsigned int rd_count,
163 if (NULL == rd) 161 if (NULL == rd)
164 return GNUNET_TIME_UNIT_ZERO_ABS; 162 return GNUNET_TIME_UNIT_ZERO_ABS;
165 expire = GNUNET_TIME_UNIT_FOREVER_ABS; 163 expire = GNUNET_TIME_UNIT_FOREVER_ABS;
166 for (c = 0; c < rd_count; c++) 164 for (unsigned int c = 0; c < rd_count; c++)
167 { 165 {
168 if (0 != (rd[c].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) 166 if (0 != (rd[c].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION))
169 { 167 {
@@ -175,12 +173,12 @@ GNUNET_GNSRECORD_record_get_expiration_time (unsigned int rd_count,
175 at.abs_value_us = rd[c].expiration_time; 173 at.abs_value_us = rd[c].expiration_time;
176 } 174 }
177 175
178 for (c2 = 0; c2 < rd_count; c2++) 176 for (unsigned int c2 = 0; c2 < rd_count; c2++)
179 { 177 {
180 /* Check for shadow record */ 178 /* Check for shadow record */
181 if ((c == c2) || 179 if ( (c == c2) ||
182 (rd[c].record_type != rd[c2].record_type) || 180 (rd[c].record_type != rd[c2].record_type) ||
183 (0 == (rd[c2].flags & GNUNET_GNSRECORD_RF_SHADOW_RECORD))) 181 (0 == (rd[c2].flags & GNUNET_GNSRECORD_RF_SHADOW_RECORD)) )
184 continue; 182 continue;
185 /* We have a shadow record */ 183 /* We have a shadow record */
186 if (0 != (rd[c2].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) 184 if (0 != (rd[c2].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION))
@@ -192,9 +190,11 @@ GNUNET_GNSRECORD_record_get_expiration_time (unsigned int rd_count,
192 { 190 {
193 at_shadow.abs_value_us = rd[c2].expiration_time; 191 at_shadow.abs_value_us = rd[c2].expiration_time;
194 } 192 }
195 at = GNUNET_TIME_absolute_max (at, at_shadow); 193 at = GNUNET_TIME_absolute_max (at,
194 at_shadow);
196 } 195 }
197 expire = GNUNET_TIME_absolute_min (at, expire); 196 expire = GNUNET_TIME_absolute_min (at,
197 expire);
198 } 198 }
199 LOG (GNUNET_ERROR_TYPE_DEBUG, 199 LOG (GNUNET_ERROR_TYPE_DEBUG,
200 "Determined expiration time for block with %u records to be %s\n", 200 "Determined expiration time for block with %u records to be %s\n",