• 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

Revision1e688824d969cab2c01130bdfd3283a2719c28e8 (tree)
Zeit2016-09-17 04:57:49
AutorJakub Pawlowski <jpawlowski@goog...>
CommiterAndre Eisenbach

Log Message

Fix bad address type assumption

LE related code should not use BTM_ACL_IS_CONNECTED, because it assumes
classic transport.

In this particular case, connection created event, which was result of
advertising, caused cancellation of "LE Create Connection".
Attempt to send "LE Create Connection Cancel" was checking if connection
is already established, but was failing to do so becuase
BTM_ACL_IS_CONNECTED was used instead of btm_bda_to_acl with proper
transport. This caused just created connection to be dropped.

Bug: 31442085
Change-Id: Ia345a3d00e8567160f4abb2a31c4130ee69d67a3
(cherry picked from commit f5566938ba671329d91c84c30ab126fbcdfc16d7)

Ändern Zusammenfassung

Diff

--- a/stack/l2cap/l2c_ble.c
+++ b/stack/l2cap/l2c_ble.c
@@ -76,7 +76,7 @@ BOOLEAN L2CA_CancelBleConnectReq (BD_ADDR rem_bda)
7676 p_lcb = l2cu_find_lcb_by_bd_addr(rem_bda, BT_TRANSPORT_LE);
7777 /* Do not remove lcb if an LE link is already up as a peripheral */
7878 if (p_lcb != NULL &&
79- !(p_lcb->link_role == HCI_ROLE_SLAVE && BTM_ACL_IS_CONNECTED(rem_bda)))
79+ !(p_lcb->link_role == HCI_ROLE_SLAVE && btm_bda_to_acl(rem_bda, BT_TRANSPORT_LE) != NULL))
8080 {
8181 p_lcb->disc_reason = L2CAP_CONN_CANCEL;
8282 l2cu_release_lcb (p_lcb);