Skip to content

Commit 076c095

Browse files
unified errno format
* Original commit: espressif/esp-idf@87506f4
1 parent 7dd0bc1 commit 076c095

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

components/mdns/mdns_networking_socket.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ size_t _mdns_udp_pcb_write(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol, c
210210
ESP_LOGD(TAG, "[sock=%d]: Sending to IP %s port %d", sock, get_string_address(&in_addr), port);
211211
ssize_t actual_len = sendto(sock, data, len, 0, (struct sockaddr *)&in_addr, ss_size);
212212
if (actual_len < 0) {
213-
ESP_LOGE(TAG, "[sock=%d]: _mdns_udp_pcb_write sendto() has failed\n error=%d: %s", sock, errno, strerror(errno));
213+
ESP_LOGE(TAG, "[sock=%d]: _mdns_udp_pcb_write sendto() has failed\n errno=%d: %s", sock, errno, strerror(errno));
214214
}
215215
return actual_len;
216216
}
@@ -396,7 +396,7 @@ static int create_socket(esp_netif_t *netif)
396396
int sock = socket(PF_INET, SOCK_DGRAM, 0);
397397
#endif
398398
if (sock < 0) {
399-
ESP_LOGE(TAG, "Failed to create socket. Error %d", errno);
399+
ESP_LOGE(TAG, "Failed to create socket. errno %d", errno);
400400
return -1;
401401
}
402402

@@ -412,7 +412,7 @@ static int create_socket(esp_netif_t *netif)
412412
bzero(&saddr.sin6_addr.s6_addr, sizeof(saddr.sin6_addr.s6_addr));
413413
int err = bind(sock, (struct sockaddr *)&saddr, sizeof(struct sockaddr_in6));
414414
if (err < 0) {
415-
ESP_LOGE(TAG, "Failed to bind socket. Error %d", errno);
415+
ESP_LOGE(TAG, "Failed to bind socket. errno %d", errno);
416416
goto err;
417417
}
418418
#else
@@ -422,7 +422,7 @@ static int create_socket(esp_netif_t *netif)
422422
bzero(&saddr.sin_addr.s_addr, sizeof(saddr.sin_addr.s_addr));
423423
int err = bind(sock, (struct sockaddr *)&saddr, sizeof(struct sockaddr_in));
424424
if (err < 0) {
425-
ESP_LOGE(TAG, "Failed to bind socket. Error %d", errno);
425+
ESP_LOGE(TAG, "Failed to bind socket. errno %d", errno);
426426
goto err;
427427
}
428428
#endif // CONFIG_LWIP_IPV6
@@ -447,7 +447,7 @@ static int socket_add_ipv6_multicast_group(int sock, esp_netif_t *netif)
447447
int ifindex = esp_netif_get_netif_impl_index(netif);
448448
int err = setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_IF, &ifindex, sizeof(ifindex));
449449
if (err < 0) {
450-
ESP_LOGE(TAG, "Failed to set IPV6_MULTICAST_IF. Error %d", errno);
450+
ESP_LOGE(TAG, "Failed to set IPV6_MULTICAST_IF. errno %d", errno);
451451
return err;
452452
}
453453

@@ -457,7 +457,7 @@ static int socket_add_ipv6_multicast_group(int sock, esp_netif_t *netif)
457457
v6imreq.ipv6mr_interface = ifindex;
458458
err = setsockopt(sock, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &v6imreq, sizeof(struct ipv6_mreq));
459459
if (err < 0) {
460-
ESP_LOGE(TAG, "Failed to set IPV6_ADD_MEMBERSHIP. Error %d", errno);
460+
ESP_LOGE(TAG, "Failed to set IPV6_ADD_MEMBERSHIP. errno %d", errno);
461461
return err;
462462
}
463463
return err;
@@ -482,7 +482,7 @@ static int socket_add_ipv4_multicast_group(int sock, esp_netif_t *netif)
482482
err = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &imreq, sizeof(struct ip_mreq));
483483
if (err < 0) {
484484
ESP_LOGE(TAG, "%d %s", sock, strerror(errno));
485-
ESP_LOGE(TAG, "Failed to set IP_ADD_MEMBERSHIP. Error %d", errno);
485+
ESP_LOGE(TAG, "Failed to set IP_ADD_MEMBERSHIP. errno %d", errno);
486486
goto err;
487487
}
488488

0 commit comments

Comments
 (0)