wget-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in


From: @rockdaboot
Subject: Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in background (!444)
Date: Sun, 03 Jul 2022 11:20:56 +0000



Tim Rühsen started a new discussion on libwget/async_dns.c: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/444#note_1014129391

> +             *dns; // DNS data (including cache). see libwget/dns.c
> +     ares_channel
> +             channel; // ares channel, to resolve DNS
> +};
> +
> +static void callback(void *arg, int status, int timeouts, struct hostent 
> *host)
> +{
> +     wget_async_dns *cur = (wget_async_dns *) arg;
> +     cur->nwaiting--;
> +
> +     if (!host || status != ARES_SUCCESS){
> +             debug_printf("Failed to lookup 1 domain: %s\n", 
> ares_strerror(status));
> +             return;
> +     }
> +
> +     char ip[INET_ADDRSTRLEN];

Move `ip` into the block.

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/444#note_1014129391
You're receiving this email because of your account on gitlab.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]