[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:23 +0000 |
Tim Rühsen started a new discussion on libwget/async_dns.c:
https://gitlab.com/gnuwget/wget2/-/merge_requests/444#note_1014129305
> + debug_printf("Failed to lookup 1 domain: %s\n",
> ares_strerror(status));
> + return;
> + }
> +
> + char ip[INET_ADDRSTRLEN];
> + if (host->h_addr_list[0] && host->h_name) {
> + inet_ntop(host->h_addrtype, host->h_addr_list[0], ip,
> sizeof(ip));
> + wget_dns_cache_ip(cur->dns, ip, host->h_name, 80);
> + wget_dns_cache_ip(cur->dns, ip, host->h_name, 443);
> + debug_printf("%s: %s\n", host->h_name, ip);
> + }
> +}
> +
> +static void wait_ares(ares_channel channel)
> +{
> + struct timeval *tvp, tv;
Use C99 style and move the declarations to where they are used the first time.
Also, if variables are only used on a block level, move them there (e.g. tvp
and tv).
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/-/merge_requests/444#note_1014129305
You're receiving this email because of your account on gitlab.com.
- Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in background (!444), @rockdaboot, 2022/07/03
- Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in background (!444), @rockdaboot, 2022/07/03
- Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in background (!444),
@rockdaboot <=
- Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in background (!444), @rockdaboot, 2022/07/03
- Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in background (!444), @rockdaboot, 2022/07/03
- Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in background (!444), @rockdaboot, 2022/07/03
- Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in background (!444), @rockdaboot, 2022/07/03
- Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in background (!444), @rockdaboot, 2022/07/03
- Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in background (!444), @rockdaboot, 2022/07/03
- Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in background (!444), @rockdaboot, 2022/07/03
- Re: wget2 | Draft: WIP: Add c-ares support for quickly fill DNS cache in background (!444), @rockdaboot, 2022/07/03