Compare commits

..

8 Commits

Author SHA1 Message Date
7c5a832821 Merge pull request #411 from gabsuren/bump_mdns_2
bump(mdns): 1.2.1 -> 1.2.2
2023-11-01 15:15:41 +04:00
0bb72f29be bump(mdns): 1.2.1 -> 1.2.2
1.2.2
Bug Fixes
- add terminator for the getting host name (b6a4d94)
- Enable ESP_WIFI_CONFIG when ESP-IDF <= 5.1 (0b783c0)
- set host list NULL on destroy (ea54eef)
- removed Wno-format flag and fixed formatting warnings (c48e442)
- remove the the range of MDNS_MAX_SERVICES and fix issues of string functions (3dadce2)
2023-11-01 13:27:40 +04:00
ebdac9cc01 Merge pull request #409 from zwx1995esp/fix/mdns_host_name_get
fix(mdns): add terminator for the getting host name
2023-11-01 13:25:15 +04:00
df04b14e2b Merge pull request #386 from gabsuren/fix/mdns_config_issue_2
Enable ESP_WIFI_CONFIG when ESP-IDF <= 5.1 (IDFGH-11221)
2023-10-31 16:11:51 +04:00
zwx
b6a4d94ab0 fix(mdns): add terminator for the getting host name 2023-10-31 19:45:35 +08:00
418791cf79 Merge pull request #408 from euripedesrocha/asio_docs_review
Updates asio docs
2023-10-31 12:08:20 +01:00
ce9337d332 docs(asio): Updates asio docs
- Removes mention to WolfSSL
- Fix links to examples
- Fix diagram markdwon.
2023-10-31 09:24:38 +01:00
0b783c01dd fix(mdns): Enable ESP_WIFI_CONFIG when ESP-IDF <= 5.1 2023-10-30 13:34:51 +04:00
6 changed files with 33 additions and 12 deletions

View File

@ -25,6 +25,7 @@ The control of lifetime of the class, done by `std::shared_ptr` usage, guarantee
async operations until it's not needed any more. This makes necessary that all of the async operation class must start
its lifetime as a `std::shared_ptr` due to the usage of `std::enable_shared_from_this`.
```
User creates a shared_ptr──┐
of AddressResolution and │
@ -47,6 +48,7 @@ its lifetime as a `std::shared_ptr` due to the usage of `std::enable_shared_from
is called. │
└────►Completion Handler()
```
The previous diagram shows the process and the life span of each of the tasks in this examples. At each stage the
object responsible for the last action inject itself to the completion handler of the next stage for reuse.

View File

@ -3,6 +3,6 @@ commitizen:
bump_message: 'bump(mdns): $current_version -> $new_version'
pre_bump_hooks: python ../../ci/changelog.py mdns
tag_format: mdns-v$version
version: 1.2.1
version: 1.2.2
version_files:
- idf_component.yml

View File

@ -1,5 +1,15 @@
# Changelog
## [1.2.2](https://github.com/espressif/esp-protocols/commits/mdns-v1.2.2)
### Bug Fixes
- add terminator for the getting host name ([b6a4d94](https://github.com/espressif/esp-protocols/commit/b6a4d94))
- Enable ESP_WIFI_CONFIG when ESP-IDF <= 5.1 ([0b783c0](https://github.com/espressif/esp-protocols/commit/0b783c0))
- set host list NULL on destroy ([ea54eef](https://github.com/espressif/esp-protocols/commit/ea54eef))
- removed Wno-format flag and fixed formatting warnings ([c48e442](https://github.com/espressif/esp-protocols/commit/c48e442))
- remove the the range of MDNS_MAX_SERVICES and fix issues of string functions ([3dadce2](https://github.com/espressif/esp-protocols/commit/3dadce2))
## [1.2.1](https://github.com/espressif/esp-protocols/commits/mdns-v1.2.1)
### Features

View File

@ -1,4 +1,4 @@
version: "1.2.1"
version: "1.2.2"
description: mDNS
url: https://github.com/espressif/esp-protocols/tree/master/components/mdns
dependencies:

View File

@ -25,6 +25,12 @@
#include "esp_wifi.h"
#endif
#if ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(5, 1, 0)
// IDF <= v5.1 does not support enabling/disabling esp-wifi
#define MDNS_ESP_WIFI_ENABLED 1
#else
#define MDNS_ESP_WIFI_ENABLED CONFIG_ESP_WIFI_ENABLED
#endif
#ifdef MDNS_ENABLE_DEBUG
void mdns_debug_packet(const uint8_t *data, size_t len);
@ -4158,7 +4164,7 @@ void mdns_preset_if_handle_system_event(void *arg, esp_event_base_t event_base,
}
esp_netif_dhcp_status_t dcst;
#if CONFIG_ESP_WIFI_ENABLED
#if MDNS_ESP_WIFI_ENABLED
if (event_base == WIFI_EVENT) {
switch (event_id) {
case WIFI_EVENT_STA_CONNECTED:
@ -5360,7 +5366,7 @@ static inline void set_default_duplicated_interfaces(void)
static inline void unregister_predefined_handlers(void)
{
#if defined(CONFIG_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
#if defined(MDNS_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
esp_event_handler_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event);
#endif
#if CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP || CONFIG_MDNS_PREDEF_NETIF_ETH
@ -5457,7 +5463,7 @@ esp_err_t mdns_init(void)
goto free_queue;
}
#if defined(CONFIG_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
#if defined(MDNS_ESP_WIFI_ENABLED) && (CONFIG_MDNS_PREDEF_NETIF_STA || CONFIG_MDNS_PREDEF_NETIF_AP)
if ((err = esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, mdns_preset_if_handle_system_event, NULL)) != ESP_OK) {
goto free_event_handlers;
}
@ -5607,7 +5613,9 @@ esp_err_t mdns_hostname_get(char *hostname)
}
MDNS_SERVICE_LOCK();
strncpy(hostname, _mdns_server->hostname, strnlen(_mdns_server->hostname, MDNS_NAME_BUF_LEN));
size_t len = strnlen(_mdns_server->hostname, MDNS_NAME_BUF_LEN - 1);
strncpy(hostname, _mdns_server->hostname, len);
hostname[len] = 0;
MDNS_SERVICE_UNLOCK();
return ESP_OK;
}

View File

@ -17,7 +17,6 @@ ESP platform port currently supports only network asynchronous socket operations
SSL/TLS support is disabled by default and could be enabled in component configuration menu by choosing TLS library from
- mbedTLS with OpenSSL translation layer (default option)
- wolfSSL
SSL support is very basic at this stage and it does include following features:
@ -32,11 +31,13 @@ Internal asio settings for ESP include
Application Example
-------------------
ESP examples are based on standard asio :example:`examples <../examples>`:
ESP examples are based on standard asio :example:`examples <../../../components/asio/examples>`:
- :example:`udp_echo_server <../examples/udp_echo_server>`
- :example:`tcp_echo_server <../examples/tcp_echo_server>`
- :example:`asio_chat <../examples/asio_chat>`
- :example:`ssl_client_server <../examples/ssl_client_server>`
- :example:`asio_chat <../../../components/asio/examples/asio_chat>`
- :example:`async_request <../../../components/asio/examples/async_request>`
- :example:`socks4 <../../../components/asio/examples/socks4>`
- :example:`ssl_client_server <../../../components/asio/examples/ssl_client_server>`
- :example:`tcp_echo_server <../../../components/asio/examples/tcp_echo_server>`
- :example:`udp_echo_server <../../../components/asio/examples/udp_echo_server>`
Please refer to the specific example README.md for details