#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 (rd_count == 0)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Lookup failed, rp_filtering?\n");
+ "Lookup failed\n");
ok = 2;
}
else
for (i=0; i<rd_count; i++)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
- if (rd[i].record_type == GNUNET_GNS_RECORD_TYPE_A)
+ if (rd[i].record_type == GNUNET_GNS_RECORD_A)
{
memcpy(&a, rd[i].data, sizeof(a));
addr = inet_ntoa(a);
if (rd_count == 0)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Lookup failed, rp_filtering?\n");
+ "Lookup failed\n");
ok = 2;
}
else
for (i=0; i<rd_count; i++)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
- if (rd[i].record_type == GNUNET_GNS_RECORD_TYPE_A)
+ if (rd[i].record_type == GNUNET_GNS_RECORD_A)
{
memcpy(&a, rd[i].data, sizeof(a));
addr = inet_ntoa(a);
}
}
- GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN_ALT2, GNUNET_GNS_RECORD_TYPE_A,
+ GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN_ALT2, GNUNET_GNS_RECORD_A,
GNUNET_YES,
NULL,
&on_lookup_result_alt2, TEST_DOMAIN_ALT2);
if (rd_count == 0)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Lookup failed, rp_filtering?\n");
+ "Lookup failed\n");
ok = 2;
}
else
for (i=0; i<rd_count; i++)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "type: %d\n", rd[i].record_type);
- if (rd[i].record_type == GNUNET_GNS_RECORD_TYPE_A)
+ if (rd[i].record_type == GNUNET_GNS_RECORD_A)
{
memcpy(&a, rd[i].data, sizeof(a));
addr = inet_ntoa(a);
}
}
- GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN_ALT, GNUNET_GNS_RECORD_TYPE_A,
+ GNUNET_GNS_lookup(gns_handle, TEST_DOMAIN_ALT, GNUNET_GNS_RECORD_A,
GNUNET_YES,
NULL,
&on_lookup_result_alt, TEST_DOMAIN_ALT);
{
+ GNUNET_NAMESTORE_disconnect (namestore_handle);
gns_handle = GNUNET_GNS_connect (cfg);
if (NULL == gns_handle)
ok = 2;
}
- GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN, GNUNET_GNS_RECORD_TYPE_A,
+ GNUNET_GNS_lookup (gns_handle, TEST_DOMAIN, GNUNET_GNS_RECORD_A,
GNUNET_YES,
NULL,
&on_lookup_result, TEST_DOMAIN);
commence_testing (void *cls, int32_t success, const char *emsg)
{
- GNUNET_NAMESTORE_disconnect(namestore_handle, GNUNET_YES);
resolver_working = GNUNET_NO;
GNUNET_RESOLVER_connect (cfg);
rd.data_size = strlen (TEST_RECORD_NS);
rd.data = TEST_RECORD_NS;
- rd.record_type = GNUNET_GNS_RECORD_TYPE_NS;
+ rd.record_type = GNUNET_GNS_RECORD_NS;
GNUNET_NAMESTORE_record_create (namestore_handle,
alice_key,
char *const argv[] = { "test-gns-ns-lookup", /* Name to give running binary */
"-c",
"test_gns_simple_lookup.conf", /* Config file to use */
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
struct GNUNET_GETOPT_CommandLineOption options[] = {
int ret;
GNUNET_log_setup ("test-gns-simple-lookup",
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
ret = check ();
/**