Fix WiFiGeneric event handler (#3412)
This commit is contained in:
parent
188560e7f3
commit
ec63d09e54
@ -54,10 +54,10 @@ static TaskHandle_t _network_event_task_handle = NULL;
|
||||
static EventGroupHandle_t _network_event_group = NULL;
|
||||
|
||||
static void _network_event_task(void * arg){
|
||||
system_event_t *event = NULL;
|
||||
system_event_t event;
|
||||
for (;;) {
|
||||
if(xQueueReceive(_network_event_queue, &event, portMAX_DELAY) == pdTRUE){
|
||||
WiFiGenericClass::_eventCallback(arg, event);
|
||||
WiFiGenericClass::_eventCallback(arg, &event);
|
||||
}
|
||||
}
|
||||
vTaskDelete(NULL);
|
||||
@ -65,7 +65,7 @@ static void _network_event_task(void * arg){
|
||||
}
|
||||
|
||||
static esp_err_t _network_event_cb(void *arg, system_event_t *event){
|
||||
if (xQueueSend(_network_event_queue, &event, portMAX_DELAY) != pdPASS) {
|
||||
if (xQueueSend(_network_event_queue, event, portMAX_DELAY) != pdPASS) {
|
||||
log_w("Network Event Queue Send Failed!");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
@ -82,7 +82,7 @@ static bool _start_network_event_task(){
|
||||
xEventGroupSetBits(_network_event_group, WIFI_DNS_IDLE_BIT);
|
||||
}
|
||||
if(!_network_event_queue){
|
||||
_network_event_queue = xQueueCreate(32, sizeof(system_event_t *));
|
||||
_network_event_queue = xQueueCreate(32, sizeof(system_event_t));
|
||||
if(!_network_event_queue){
|
||||
log_e("Network Event Queue Create Failed!");
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user