mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-16 12:02:11 +02:00
Merge pull request #302 from gytxxsy/feature/allow_add_host_without_addr
mdns: allow for adding a delegated host with no address (IDFGH-10246)
This commit is contained in:
@ -5577,7 +5577,7 @@ esp_err_t mdns_delegate_hostname_add(const char *hostname, const mdns_ip_addr_t
|
|||||||
if (!_mdns_server) {
|
if (!_mdns_server) {
|
||||||
return ESP_ERR_INVALID_STATE;
|
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;
|
return ESP_ERR_INVALID_ARG;
|
||||||
}
|
}
|
||||||
char *new_hostname = strndup(hostname, MDNS_NAME_BUF_LEN - 1);
|
char *new_hostname = strndup(hostname, MDNS_NAME_BUF_LEN - 1);
|
||||||
|
Reference in New Issue
Block a user