Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi.
Summary
Currently
_network_event_cb
pass pointer tosystem_event_t
into_network_event_queue
, instead of value.I think this wrong. And this pull request fix that.
Description
Method
esp_event_loop_task
that calls_network_event_cb
storessystem_event_t
in stack:So when
_network_event_cb
sent pointer in_network_event_queue
it stores pointer to stack in queue. And if several events occurs it send the same value of pointer to_network_event_queue
. It is not that we want.And more, when
_network_event_task
reads this pointer, value ofsystem_event_t
may be corrupt, because in this time in parallel task methodesp_event_loop_task
callsxQueueReceive
that replacingsystem_event_t
.