Create a new pending queue, then re-submit pending requests in old pending queue,preventing new events being inserted into it.
Closes https://github.com/espressif/esp-idf/issues/2191
/* Now, re-submit anything in the mux queue */
bq = btm_cb.sec_pending_q;
- if (!btm_cb.sec_pending_q) {
- btm_cb.sec_pending_q = fixed_queue_new(QUEUE_SIZE_MAX);
- }
+
+ btm_cb.sec_pending_q = fixed_queue_new(QUEUE_SIZE_MAX);
+
while ((p_e = (tBTM_SEC_QUEUE_ENTRY *)fixed_queue_try_dequeue(bq)) != NULL) {
/* Check that the ACL is still up before starting security procedures */
osi_free (p_e);
}
+ fixed_queue_free(bq, NULL);
}
}
#endif ///SMP_INCLUDED == TRUE