From: Christian Grothoff Date: Sat, 24 Aug 2013 10:23:08 +0000 (+0000) Subject: -towards translating .+ names in GNS records X-Git-Tag: initial-import-from-subversion-38251~7647 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=309372ff522a9bb0bf5437c760f50296586c5922;p=oweals%2Fgnunet.git -towards translating .+ names in GNS records --- diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 3cb05a371..22ef0deb3 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c @@ -1138,9 +1138,13 @@ handle_gns_resolution_result (void *cls, const char *vname; struct GNUNET_HashCode vhash; int af; - char **scratch; - unsigned int scratch_len; - + char scratch[UINT16_MAX]; + size_t scratch_off; + size_t scratch_start; + size_t off; + struct GNUNET_NAMESTORE_RecordData rd_new[rd_count]; + unsigned int rd_off; + if (0 == rh->name_resolution_pos) { /* top-level match, are we done yet? */ @@ -1210,20 +1214,52 @@ handle_gns_resolution_result (void *cls, } /* convert relative names in record values to absolute names, using 'scratch' array for memory allocations */ - scratch = NULL; - scratch_len = 0; + scratch_off = 0; + rd_off = 0; for (i=0;iproc (rh->proc_cls, rd_count, rd); + rh->proc (rh->proc_cls, rd_off, rd_new); GNS_resolver_lookup_cancel (rh); - for (i=0;i