Skip to content

Commit

Permalink
fix(mdns): Fixed complier warning if MDNS_MAX_SERVICES==0
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cermak committed Jan 10, 2025
1 parent 4394f84 commit 980f3d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/mdns/mdns.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -334,6 +334,9 @@ static mdns_host_item_t *mdns_get_host_item(const char *hostname)

static bool _mdns_can_add_more_services(void)
{
#if MDNS_MAX_SERVICES == 0
return false;
#else
mdns_srv_item_t *s = _mdns_server->services;
uint16_t service_num = 0;
while (s) {
Expand All @@ -343,8 +346,8 @@ static bool _mdns_can_add_more_services(void)
return false;
}
}

return true;
#endif
}

esp_err_t _mdns_send_rx_action(mdns_rx_packet_t *packet)
Expand Down

0 comments on commit 980f3d3

Please sign in to comment.