OSDN Git Service

LE fixes
authorAndre Eisenbach <andre@broadcom.com>
Wed, 13 Feb 2013 08:02:11 +0000 (17:02 +0900)
committerMatthew Xie <mattx@google.com>
Mon, 11 Mar 2013 23:39:07 +0000 (16:39 -0700)
commit48db2d254997a69f8709e94c55607732e7772436
treea6269f0e692dde99915d1037f676d69856b4f80c
parentb291d10545c3f316fdcbc21e8f58444c51e72569
LE fixes

- Null pointer exception check added.

An exception occurs at the memcpy in the bta_dm_gatt_disc_result.
User removed the battery on Ble device(Smart Nudge) during bonding
and connection. This exception occurs sometimes.
I used Broadcom LE Explorer to reproduce it.

- Fixed disconnect and encryption behaviour

Disconnect will now disconnect the physical link immediately when no
other application is interested in the device anymore. Also, the
connection to a remote device is now dropped if encryption fails.

- Deep copy buffers when transfering context

Certain BTA server event types require a deep copy of the request
data buffers when transfering context. Shallow copy of the pointers
involved may cause a crash when overlapping read and write requests
are received.

- 2nd encryption has not started

need to send encryption complete callback
when the encryption fail due to link drop without a complete event.
Otherwise BTA layer would not be able to clean up the status,
and no further encryption can be started.

Change-Id: If93e0a188e8779830c8991e4193b96dc95e23e5d
bta/dm/bta_dm_act.c
bta/gatt/bta_gattc_act.c
bta/gatt/bta_gattc_cache.c
btif/src/btif_dm.c
btif/src/btif_gatt_server.c
btif/src/btif_gatt_util.c
stack/btm/btm_ble.c
stack/btm/btm_sec.c
stack/l2cap/l2c_api.c