diff options
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration_stop.c')
-rw-r--r-- | src/namestore/test_namestore_api_zone_iteration_stop.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c index c7358fc6e..98514885c 100644 --- a/src/namestore/test_namestore_api_zone_iteration_stop.c +++ b/src/namestore/test_namestore_api_zone_iteration_stop.c | |||
@@ -25,7 +25,9 @@ | |||
25 | #include "gnunet_namestore_service.h" | 25 | #include "gnunet_namestore_service.h" |
26 | #include "gnunet_testing_lib.h" | 26 | #include "gnunet_testing_lib.h" |
27 | #include "namestore.h" | 27 | #include "namestore.h" |
28 | #include "gnunet_dnsparser_lib.h" | ||
28 | 29 | ||
30 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT | ||
29 | 31 | ||
30 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100) | 32 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100) |
31 | #define WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) | 33 | #define WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) |
@@ -349,14 +351,14 @@ put_cont (void *cls, int32_t success, const char *emsg) | |||
349 | static struct GNUNET_GNSRECORD_Data * | 351 | static struct GNUNET_GNSRECORD_Data * |
350 | create_record (unsigned int count) | 352 | create_record (unsigned int count) |
351 | { | 353 | { |
352 | unsigned int c; | 354 | struct GNUNET_GNSRECORD_Data *rd; |
353 | struct GNUNET_GNSRECORD_Data * rd; | ||
354 | 355 | ||
355 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_GNSRECORD_Data)); | 356 | rd = GNUNET_new_array (count, |
356 | for (c = 0; c < count; c++) | 357 | struct GNUNET_GNSRECORD_Data); |
358 | for (unsigned int c = 0; c < count; c++) | ||
357 | { | 359 | { |
358 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; | 360 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; |
359 | rd[c].record_type = 1111; | 361 | rd[c].record_type = TEST_RECORD_TYPE; |
360 | rd[c].data_size = 50; | 362 | rd[c].data_size = 50; |
361 | rd[c].data = GNUNET_malloc(50); | 363 | rd[c].data = GNUNET_malloc(50); |
362 | rd[c].flags = 0; | 364 | rd[c].flags = 0; |