OSDN Git Service

DO NOT MERGE - Remove ACL connection reference counting
authorAndre Eisenbach <eisenbach@google.com>
Thu, 12 Mar 2015 17:09:14 +0000 (10:09 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Thu, 19 Mar 2015 22:20:02 +0000 (15:20 -0700)
commit02c530503feb46150d013bf87b0570a781fb10ec
tree4cfac9527ba53c873e62845e0d017a8a67af011a
parenta40848a8810b95ad279d4294c8e6cbba2b09347a
DO NOT MERGE - Remove ACL connection reference counting

In addition to maintaining ACL link control blocks, which carry a
"in_use" flag, ACL links are reference counted in the num_acl links
variable.

The reference counting is thrown off when a SM connection initiated for
pairing is followed up by a GATT connection after pairing completes. The
2nd connection is counted against num_acl, even so other parts of the
code recognize the connection as a duplicate ACL connection to the same
BDA.

This patch removes the unecessary reference counting and relies on the
control block status instead, which is correctly maintained.

The BTM_BUSY_LEVEL_CHANGE_INCLUDED flag encapsulating the num_acl
tracking should be removed in the future.

Bug: 19019189
Change-Id: I4cc88c24f1c4d1273361d879bc62e9fade3f3ee9
stack/btm/btm_acl.c
stack/btm/btm_int.h
stack/btm/btm_pm.c