Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_work_queue_delete_on_bluedroid' into 'master'
Browse files Browse the repository at this point in the history
fix(bt/bluedroid): Fixed work queue delete when create thread failed

See merge request espressif/esp-idf!33037
  • Loading branch information
jack0c committed Aug 26, 2024
2 parents 08fbc01 + ec0277d commit f54e1a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/bt/common/osi/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ osi_thread_t *osi_thread_create(const char *name, size_t stack_size, int priorit
}

for (int i = 0; i < thread->work_queue_num; i++) {
if (thread->work_queues[i]) {
if (thread->work_queues && thread->work_queues[i]) {
osi_work_queue_delete(thread->work_queues[i]);
thread->work_queues[i] = NULL;
}
thread->work_queues[i] = NULL;
}

if (thread->work_queues) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *par
}
case ESP_GAP_BLE_EXT_SCAN_START_COMPLETE_EVT:
if (param->ext_scan_start.status != ESP_BT_STATUS_SUCCESS) {
ESP_LOGE(GATTC_TAG, "scan start failed, error status = %x", param->scan_start_cmpl.status);
ESP_LOGE(GATTC_TAG, "scan start failed, error status = %x", param->ext_scan_start.status);
break;
}
ESP_LOGI(GATTC_TAG, "Scan start success");
Expand Down

0 comments on commit f54e1a8

Please sign in to comment.