struct GNS_ResolverHandle *rh = cls;
struct AuthorityChain *ac;
struct AuthorityChain *shorten_ac;
- unsigned int i;
char *cname;
struct VpnContext *vpn_ctx;
const struct GNUNET_TUN_GnsVpnRecord *vpn;
if ( (GNUNET_DNSPARSER_TYPE_A == rh->record_type) ||
(GNUNET_DNSPARSER_TYPE_AAAA == rh->record_type) )
{
- for (i=0;i<rd_count;i++)
+ for (unsigned int i=0;i<rd_count;i++)
{
switch (rd[i].record_type)
{
scratch_off = 0;
rd_off = 0;
shorten_ac = rh->ac_tail;
- for (i=0;i<rd_count;i++)
+ for (unsigned int i=0;i<rd_count;i++)
{
+ GNUNET_assert (rd_off <= i);
if ( (0 != rh->protocol) &&
(0 != rh->service) &&
(GNUNET_GNSRECORD_TYPE_BOX != rd[i].record_type) )
continue; /* we _only_ care about boxed records */
+ GNUNET_assert (rd_off < rd_count);
rd_new[rd_off] = rd[i];
/* Check if the embedded name(s) end in "+", and if so,
replace the "+" with the zone at "ac_tail", changing the name
}
else
{
+ GNUNET_assert (rd_off < rd_count);
rd_new[rd_off].data = &scratch[scratch_start];
rd_new[rd_off].data_size = scratch_off - scratch_start;
rd_off++;
}
else
{
+ GNUNET_assert (rd_off < rd_count);
rd_new[rd_off].data = &scratch[scratch_start];
rd_new[rd_off].data_size = scratch_off - scratch_start;
rd_off++;
}
else
{
+ GNUNET_assert (rd_off < rd_count);
rd_new[rd_off].data = &scratch[scratch_start];
rd_new[rd_off].data_size = scratch_off - scratch_start;
rd_off++;
}
else
{
+ GNUNET_assert (rd_off < rd_count);
rd_new[rd_off].data = &scratch[scratch_start];
rd_new[rd_off].data_size = scratch_off - scratch_start;
rd_off++;
(ntohs (box->service) == rh->service) )
{
/* Box matches, unbox! */
+ GNUNET_assert (rd_off < rd_count);
rd_new[rd_off].record_type = ntohl (box->record_type);
rd_new[rd_off].data_size -= sizeof (struct GNUNET_GNSRECORD_BoxRecord);
rd_new[rd_off].data = &box[1];
records (for modern, GNS-enabled applications) */
rd_off++;
}
+ break;
}
default:
rd_off++;
}
do_recurse:
/* need to recurse, check if we can */
- for (i=0;i<rd_count;i++)
+ for (unsigned int i=0;i<rd_count;i++)
{
switch (rd[i].record_type)
{
}
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("GNS lookup recursion failed (no delegation record found)\n"));
- rh->proc (rh->proc_cls, 0, NULL);
+ rh->proc (rh->proc_cls,
+ 0,
+ NULL);
GNS_resolver_lookup_cancel (rh);
}