mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-18 07:37:54 +00:00
docs(wifi_provisioning): Use heap to allocate memory for the response
Added a note to specify that the memory for the response of a custom endpoint should be allocated using the heap, as this memory gets freed by the protocomm layer once it has been passed to the transport layer. Closes https://github.com/espressif/esp-idf/issues/13263
This commit is contained in:
@@ -230,6 +230,8 @@ static void get_device_service_name(char *service_name, size_t max)
|
||||
/* Handler for the optional provisioning endpoint registered by the application.
|
||||
* The data format can be chosen by applications. Here, we are using plain ascii text.
|
||||
* Applications can choose to use other formats like protobuf, JSON, XML, etc.
|
||||
* Note that memory for the response buffer must be allocated using heap as this buffer
|
||||
* gets freed by the protocomm layer once it has been sent by the transport layer.
|
||||
*/
|
||||
esp_err_t custom_prov_data_handler(uint32_t session_id, const uint8_t *inbuf, ssize_t inlen,
|
||||
uint8_t **outbuf, ssize_t *outlen, void *priv_data)
|
||||
|
Reference in New Issue
Block a user