mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 15:14:33 +02:00
clear old event bits when malloc a slot
This commit is contained in:
@@ -135,6 +135,11 @@ static spp_slot_t *spp_malloc_slot(void)
|
|||||||
(*slot)->is_server = false;
|
(*slot)->is_server = false;
|
||||||
(*slot)->write_data = NULL;
|
(*slot)->write_data = NULL;
|
||||||
(*slot)->close_alarm = 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)) {
|
if (init_slot_data(&(*slot)->rx, QUEUE_SIZE_MAX)) {
|
||||||
BTC_TRACE_ERROR("%s unable to malloc rx queue!", __func__);
|
BTC_TRACE_ERROR("%s unable to malloc rx queue!", __func__);
|
||||||
err_no = 1;
|
err_no = 1;
|
||||||
|
Reference in New Issue
Block a user