/**
* ID of a task associated with the resolution process.
*/
- struct GNUNET_SCHEDULER_Task * task_id;
+ struct GNUNET_SCHEDULER_Task *task_id;
/**
* The name to resolve
* Begin the resolution process from 'name', starting with
* the identification of the zone specified by 'name'.
*
- * @param rh resolution to perform
+ * @param cls closure with `struct GNS_ResolverHandle *rh`
*/
static void
-start_resolver_lookup (struct GNS_ResolverHandle *rh);
+start_resolver_lookup (void *cls);
/**
unsigned int rd_count;
unsigned int i;
+ (void) rs;
rh->dns_request = NULL;
GNUNET_SCHEDULER_cancel (rh->task_id);
rh->task_id = NULL;
GNUNET_free (rh->name);
rh->name = GNUNET_strdup (p->answers[0].data.hostname);
rh->name_resolution_pos = strlen (rh->name);
- start_resolver_lookup (rh);
+ rh->task_id = GNUNET_SCHEDULER_add_now (&start_resolver_lookup,
+ rh);
GNUNET_DNSPARSER_free_packet (p);
return;
}
GNUNET_free (rh->name);
rh->name = GNUNET_strdup (cname);
rh->name_resolution_pos = strlen (rh->name);
- start_resolver_lookup (rh);
+ rh->task_id = GNUNET_SCHEDULER_add_now (&start_resolver_lookup,
+ rh);
}
g2dc->rh->options = GNUNET_GNS_LO_DEFAULT;
g2dc->rh->loop_limiter = rh->loop_limiter + 1;
rh->g2dc = g2dc;
- start_resolver_lookup (g2dc->rh);
+ g2dc->rh->task_id
+ = GNUNET_SCHEDULER_add_now (&start_resolver_lookup,
+ g2dc->rh);
return;
}
case GNUNET_DNSPARSER_TYPE_CNAME:
struct CacheOps *co = cls;
co->namecache_qe_cache = NULL;
- if (NULL != emsg)
+ if (GNUNET_OK != success)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Failed to cache GNS resolution: %s\n"),
emsg);
const struct GNUNET_PeerIdentity *put_path,
unsigned int put_path_length,
enum GNUNET_BLOCK_Type type,
- size_t size, const void *data)
+ size_t size,
+ const void *data)
{
struct GNS_ResolverHandle *rh = cls;
struct AuthorityChain *ac = rh->ac_tail;
const struct GNUNET_GNSRECORD_Block *block;
struct CacheOps *co;
+ (void) exp;
+ (void) key;
+ (void) get_path;
+ (void) get_path_length;
+ (void) put_path;
+ (void) put_path_length;
+ (void) type;
GNUNET_DHT_get_stop (rh->get_handle);
rh->get_handle = NULL;
GNUNET_CONTAINER_heap_remove_node (rh->dht_heap_node);
* Begin the resolution process from 'name', starting with
* the identification of the zone specified by 'name'.
*
- * @param rh resolution to perform
+ * @param cls the `struct GNS_ResolverHandle`
*/
static void
-start_resolver_lookup (struct GNS_ResolverHandle *rh)
+start_resolver_lookup (void *cls)
{
+ struct GNS_ResolverHandle *rh = cls;
struct AuthorityChain *ac;
char *y;
struct in_addr v4;
struct in6_addr v6;
+ rh->task_id = NULL;
if (1 == inet_pton (AF_INET,
rh->name,
&v4))
rh->record_type = record_type;
rh->name = GNUNET_strdup (name);
rh->name_resolution_pos = strlen (name);
- start_resolver_lookup (rh);
+ rh->task_id = GNUNET_SCHEDULER_add_now (&start_resolver_lookup,
+ rh);
return rh;
}