• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

Revision42a3fb75c3258a084146e6f95bb649cf9e4f566e (tree)
Zeit2020-05-20 14:07:45
AutorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Avoid more annoying crashing

Ändern Zusammenfassung

Diff

--- a/device/src/controller.c
+++ b/device/src/controller.c
@@ -28,6 +28,7 @@
2828 #include "btcore/include/version.h"
2929 #include "hcimsgs.h"
3030 #include "osi/include/future.h"
31+#include "osi/include/log.h"
3132 #include "stack/include/btm_ble_api.h"
3233
3334 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) {
252253 &number_of_local_supported_codecs, local_supported_codecs);
253254 }
254255
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+ }
256259
257260 readable = true;
258261 return future_new_immediate(FUTURE_SUCCESS);
--- a/hci/src/packet_fragmenter.c
+++ b/hci/src/packet_fragmenter.c
@@ -135,8 +135,6 @@ static void reassemble_and_dispatch(UNUSED_ATTR BT_HDR *packet) {
135135 STREAM_TO_UINT16(acl_length, stream);
136136 STREAM_TO_UINT16(l2cap_length, stream);
137137
138- assert(acl_length == packet->len - HCI_ACL_PREAMBLE_SIZE);
139-
140138 uint8_t boundary_flag = GET_BOUNDARY_FLAG(handle);
141139 handle = handle & HANDLE_MASK;
142140