mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-23 15:27:28 +02:00
mdns: fix IPV4 only build and also update CI configuration
Earlier commit 48c157bc46
had typo
regarding variable name. This was not caught in CI because IPV6
was not really getting disabled due to an indirect dependency
of `CONFIG_EXAMPLE_CONNECT_IPV6`.
This commit fixes both the problems.
This commit is contained in:
@ -332,10 +332,15 @@ static void query_mdns_host_with_getaddrinfo(char * host)
|
||||
|
||||
if (!getaddrinfo(host, NULL, &hints, &res)) {
|
||||
while (res) {
|
||||
ESP_LOGI(TAG, "getaddrinfo: %s resolved to: %s", host,
|
||||
res->ai_family == AF_INET?
|
||||
inet_ntoa(((struct sockaddr_in *) res->ai_addr)->sin_addr):
|
||||
inet_ntoa(((struct sockaddr_in6 *) res->ai_addr)->sin6_addr));
|
||||
char *resolved_addr;
|
||||
#if CONFIG_LWIP_IPV6
|
||||
resolved_addr = res->ai_family == AF_INET ?
|
||||
inet_ntoa(((struct sockaddr_in *) res->ai_addr)->sin_addr) :
|
||||
inet_ntoa(((struct sockaddr_in6 *) res->ai_addr)->sin6_addr);
|
||||
#else
|
||||
resolved_addr = inet_ntoa(((struct sockaddr_in *) res->ai_addr)->sin_addr);
|
||||
#endif // CONFIG_LWIP_IPV6
|
||||
ESP_LOGI(TAG, "getaddrinfo: %s resolved to: %s", host, resolved_addr);
|
||||
res = res->ai_next;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user