X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fgns%2Ftest_gns_max_queries.c;h=aadd1a8fa7ce2608ff8b26d545c1a3b6f834a457;hb=39850a9dc3d789303b91816275314898c0ae80e2;hp=fecc409254bf2a31b44381190259762b77eac764;hpb=db93dcf5dd2c9ec06a7375ed250f842c62bc8905;p=oweals%2Fgnunet.git diff --git a/src/gns/test_gns_max_queries.c b/src/gns/test_gns_max_queries.c index fecc40925..aadd1a8fa 100644 --- a/src/gns/test_gns_max_queries.c +++ b/src/gns/test_gns_max_queries.c @@ -32,15 +32,10 @@ #include "gnunet_dnsparser_lib.h" #include "gnunet_gns_service.h" -/* DEFINES */ -#define VERBOSE GNUNET_YES /* Timeout for entire testcase */ #define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 20) -/* If number of peers not in config file, use this number */ -#define DEFAULT_NUM_PEERS 2 - /* test records to resolve */ #define TEST_DOMAIN "www.gads" #define TEST_DOMAIN_NACK "doesnotexist.bob.gads" @@ -51,10 +46,8 @@ #define KEYFILE_BOB "../namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey" -/* Globals */ - /* Task handle to use to schedule test failure */ -GNUNET_SCHEDULER_TaskIdentifier die_task; +static GNUNET_SCHEDULER_TaskIdentifier die_task; /* Global return value (0 for success, anything else for failure) */ static int ok; @@ -63,10 +56,14 @@ static struct GNUNET_NAMESTORE_Handle *namestore_handle; static struct GNUNET_GNS_Handle *gns_handle; -const struct GNUNET_CONFIGURATION_Handle *cfg; +static const struct GNUNET_CONFIGURATION_Handle *cfg; static unsigned long long max_parallel_lookups; +static struct GNUNET_GNS_LookupRequest **requests; + +static unsigned int num_requests; + /** * Check if the get_handle is being used, if so stop the request. Either @@ -76,13 +73,17 @@ static unsigned long long max_parallel_lookups; static void end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { + unsigned int i; + + for (i=0;i