]> granicus.if.org Git - esp-idf/commit
esp_event: fix issue with post data preparation
authorRenz Christian Bagaporo <renz@espressif.com>
Thu, 16 May 2019 03:51:57 +0000 (11:51 +0800)
committerRenz Christian Bagaporo <renz@espressif.com>
Wed, 22 May 2019 03:28:39 +0000 (11:28 +0800)
commitf21b8bbf557cb5bf8b9ab3f788247dd52ce5d99b
tree647481acf1acde7846ccfb3886308e1c5ae2a990
parente8ade3c68d01e504069349396fa6efa9ae2c8c14
esp_event: fix issue with post data preparation

Fixes an issue with post instance data preparation. Currently, there is
no way to check if event data has really been set during handler
execution preparation. When data is not allocated from the heap, user
could have passed 0x0 which can lead to failed checks.

This also implements using the already allocated data memory for posting
events from non-ISR functions when data size is less than the capacity.
components/esp_event/esp_event.c
components/esp_event/private_include/esp_event_internal.h