diff options
Diffstat (limited to 'src/namestore/test_namestore_api_monitoring.c')
-rw-r--r-- | src/namestore/test_namestore_api_monitoring.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c index de202d535..7c8ee27d7 100644 --- a/src/namestore/test_namestore_api_monitoring.c +++ b/src/namestore/test_namestore_api_monitoring.c | |||
@@ -25,6 +25,10 @@ | |||
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" | ||
29 | |||
30 | #define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT | ||
31 | |||
28 | 32 | ||
29 | 33 | ||
30 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100) | 34 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100) |
@@ -244,14 +248,14 @@ put_cont (void *cls, | |||
244 | static struct GNUNET_GNSRECORD_Data * | 248 | static struct GNUNET_GNSRECORD_Data * |
245 | create_record (unsigned int count) | 249 | create_record (unsigned int count) |
246 | { | 250 | { |
247 | unsigned int c; | 251 | struct GNUNET_GNSRECORD_Data *rd; |
248 | struct GNUNET_GNSRECORD_Data * rd; | ||
249 | 252 | ||
250 | rd = GNUNET_malloc (count * sizeof (struct GNUNET_GNSRECORD_Data)); | 253 | rd = GNUNET_new_array (count, |
251 | for (c = 0; c < count; c++) | 254 | struct GNUNET_GNSRECORD_Data); |
255 | for (unsigned int c = 0; c < count; c++) | ||
252 | { | 256 | { |
253 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; | 257 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; |
254 | rd[c].record_type = 1111; | 258 | rd[c].record_type = TEST_RECORD_TYPE; |
255 | rd[c].data_size = 50; | 259 | rd[c].data_size = 50; |
256 | rd[c].data = GNUNET_malloc(50); | 260 | rd[c].data = GNUNET_malloc(50); |
257 | rd[c].flags = 0; | 261 | rd[c].flags = 0; |