system/bt
リビジョン | 42a3fb75c3258a084146e6f95bb649cf9e4f566e (tree) |
---|---|
日時 | 2020-05-20 14:07:45 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
コミッター | Chih-Wei Huang |
Avoid more annoying crashing
@@ -28,6 +28,7 @@ | ||
28 | 28 | #include "btcore/include/version.h" |
29 | 29 | #include "hcimsgs.h" |
30 | 30 | #include "osi/include/future.h" |
31 | +#include "osi/include/log.h" | |
31 | 32 | #include "stack/include/btm_ble_api.h" |
32 | 33 | |
33 | 34 | const bt_event_mask_t BLE_EVENT_MASK = { "\x00\x00\x00\x00\x00\x00\x06\x7f" }; |
@@ -252,7 +253,9 @@ static future_t *start_up(void) { | ||
252 | 253 | &number_of_local_supported_codecs, local_supported_codecs); |
253 | 254 | } |
254 | 255 | |
255 | - assert(HCI_READ_ENCR_KEY_SIZE_SUPPORTED(supported_commands)); | |
256 | + if (!HCI_READ_ENCR_KEY_SIZE_SUPPORTED(supported_commands)) { | |
257 | + LOG_WARN(LOG_TAG, "Controller doesn't support Read Encryption Key Size command"); | |
258 | + } | |
256 | 259 | |
257 | 260 | readable = true; |
258 | 261 | return future_new_immediate(FUTURE_SUCCESS); |
@@ -135,8 +135,6 @@ static void reassemble_and_dispatch(UNUSED_ATTR BT_HDR *packet) { | ||
135 | 135 | STREAM_TO_UINT16(acl_length, stream); |
136 | 136 | STREAM_TO_UINT16(l2cap_length, stream); |
137 | 137 | |
138 | - assert(acl_length == packet->len - HCI_ACL_PREAMBLE_SIZE); | |
139 | - | |
140 | 138 | uint8_t boundary_flag = GET_BOUNDARY_FLAG(handle); |
141 | 139 | handle = handle & HANDLE_MASK; |
142 | 140 |