diff --git a/nimble/host/src/ble_hs_hci.c b/nimble/host/src/ble_hs_hci.c index 5847b63a0..ace9bdf05 100644 --- a/nimble/host/src/ble_hs_hci.c +++ b/nimble/host/src/ble_hs_hci.c @@ -106,7 +106,7 @@ #define BLE_ERR_MAX 0xff struct err_code { - int code; + int error_code; char *msg; }; @@ -180,20 +180,26 @@ static struct err_code err_code_list[] = { { BLE_HS_HCI_ERR(BLE_ERR_MAX), ": BLE_ERR_MAX"} }; -static void esp_hci_err_to_name(int code) +static void esp_hci_err_to_name(int error_code, uint16_t *opcode) { - if (code == 0) { + if (error_code == 0) { return; } - else if (code - 0x200 < 0) { + else if (error_code - 0x200 < 0) { /* Converts error code to HCI base */ - code = BLE_HS_HCI_ERR(code); + error_code = BLE_HS_HCI_ERR(error_code); } for (int i = 0; i