Skip to content

Commit

Permalink
feat(mdns): Allow for adding a delegated host with no address
Browse files Browse the repository at this point in the history
  • Loading branch information
gytxxsy committed May 26, 2023
1 parent 8b9c957 commit c562461
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/mdns/mdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -5577,7 +5577,7 @@ esp_err_t mdns_delegate_hostname_add(const char *hostname, const mdns_ip_addr_t
if (!_mdns_server) {
return ESP_ERR_INVALID_STATE;
}
if (_str_null_or_empty(hostname) || strlen(hostname) > (MDNS_NAME_BUF_LEN - 1) || address_list == NULL) {
if (_str_null_or_empty(hostname) || strlen(hostname) > (MDNS_NAME_BUF_LEN - 1)) {
return ESP_ERR_INVALID_ARG;
}
char *new_hostname = strndup(hostname, MDNS_NAME_BUF_LEN - 1);
Expand Down

0 comments on commit c562461

Please sign in to comment.