mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 09:39:10 -04:00
clear old event bits when malloc a slot
This commit is contained in:
parent
2a8ef2103f
commit
66e88fbdbe
@ -135,6 +135,11 @@ static spp_slot_t *spp_malloc_slot(void)
|
||||
(*slot)->is_server = false;
|
||||
(*slot)->write_data = NULL;
|
||||
(*slot)->close_alarm = NULL;
|
||||
/* clear the old event bits */
|
||||
if (spp_local_param.tx_event_group) {
|
||||
xEventGroupClearBits(spp_local_param.tx_event_group, SLOT_WRITE_BIT(i) | SLOT_CLOSE_BIT(i));
|
||||
}
|
||||
|
||||
if (init_slot_data(&(*slot)->rx, QUEUE_SIZE_MAX)) {
|
||||
BTC_TRACE_ERROR("%s unable to malloc rx queue!", __func__);
|
||||
err_no = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user