From 2f8b12deb402895b0de06c6e2dabe512c5caa81b Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 31 Jan 2023 12:16:37 +0100 Subject: [PATCH] mqtt/docs: Mention removal of user_context in 5.x migration guide update CN for migration-guides/release-5.x/5.0/protocols.rst Co-Authored-By: Wang Zi Yan Closes https://github.com/espressif/esp-idf/issues/10644 --- docs/en/migration-guides/release-5.x/5.0/protocols.rst | 6 ++++-- docs/zh_CN/migration-guides/release-5.x/5.0/protocols.rst | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/en/migration-guides/release-5.x/5.0/protocols.rst b/docs/en/migration-guides/release-5.x/5.0/protocols.rst index 842ee4e8b6..6f2f45b39f 100644 --- a/docs/en/migration-guides/release-5.x/5.0/protocols.rst +++ b/docs/en/migration-guides/release-5.x/5.0/protocols.rst @@ -169,7 +169,7 @@ MQTT Client Breaking Changes (Summary) ~~~~~~~~~~~~~~~~~~~~~~~~~~ -- :cpp:type:`esp_mqtt_client_config_t` have all fields grouped in sub structs. +- :cpp:type:`esp_mqtt_client_config_t` have all fields grouped in sub structs. Most common configurations are listed below: @@ -177,9 +177,11 @@ Most common configurations are listed below: - Security related to broker verification in :cpp:member:`esp_mqtt_client_config_t::broker::verification` - Client username is set in :cpp:member:`esp_mqtt_client_config_t::credentials::username` +- :cpp:type:`esp_mqtt_client_config_t` no longer supports the ``user_context`` field. Please use :cpp:func:`esp_mqtt_client_register_event` instead for registering an event handler; the last argument ``event_handler_arg`` can be used to pass user context to the handler. + ESP-Modbus ----------- +----------- Breaking Changes (Summary) ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/zh_CN/migration-guides/release-5.x/5.0/protocols.rst b/docs/zh_CN/migration-guides/release-5.x/5.0/protocols.rst index 87bcec3621..b97221e670 100644 --- a/docs/zh_CN/migration-guides/release-5.x/5.0/protocols.rst +++ b/docs/zh_CN/migration-guides/release-5.x/5.0/protocols.rst @@ -177,6 +177,8 @@ MQTT 客户端 - 通过 :cpp:member:`esp_mqtt_client_config_t::broker::verification` 配置 MQTT Broker 身份验证的相关安全问题 - 通过 :cpp:member:`esp_mqtt_client_config_t::credentials::username` 配置客户端用户名 +- :cpp:type:`esp_mqtt_client_config_t` 不再支持 ``user_context`` 字段。之后注册事件处理程序,请使用 :cpp:func:`esp_mqtt_client_register_event`;最后一个参数 ``event_handler_arg`` 可用于将用户上下文传递给处理程序。 + ESP-Modbus ----------