OSDN Git Service

LE: Add notification sent and congestion callbacks (2/4)
authorAndre Eisenbach <eisenbach@google.com>
Fri, 28 Mar 2014 21:54:22 +0000 (14:54 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 27 Jun 2014 23:41:20 +0000 (16:41 -0700)
commit493a98a8de29a35808db28470736819af5fd22d2
tree5bbb2c848c00f8bfe545e4dd32cad29854278a07
parenta3164c9b0b2da60509f16bcbc23c36e30d3df862
LE: Add notification sent and congestion callbacks (2/4)

This change introduces two new callbacks for applications to better
handle LE notification flow control and transport congestion. The
notification callback is invoked when the remote platform confirms an
indication or when a local notification has been passed to the
controller. No new notifications should be sent until a callback is
received.

Congestion callbacks are triggered when a GATT operation cannot be sent
to the local Bluetooth controller. Repeatedly calling
writeCharacteristic() for example will eventually trigger a congestion
callback. Applications cannot send additional data until a further
callback is received, indicating that the congestion has cleared up.

Also fixes a memory leak issue that can trigger GKI exception for
certain GATT operations.

Change-Id: I7112bdfc1fedec2e390bd0ea52655d238683917f
21 files changed:
bta/gatt/bta_gattc_act.c
bta/gatt/bta_gattc_main.c
bta/gatt/bta_gatts_act.c
bta/include/bta_gatt_api.h
btif/src/btif_gatt_client.c
btif/src/btif_gatt_server.c
btif/src/btif_gatt_test.c
include/bt_target.h
stack/gap/gap_ble.c
stack/gatt/att_protocol.c
stack/gatt/gatt_api.c
stack/gatt/gatt_attr.c
stack/gatt/gatt_cl.c
stack/gatt/gatt_int.h
stack/gatt/gatt_main.c
stack/include/gatt_api.h
stack/include/l2c_api.h
stack/l2cap/l2c_api.c
stack/l2cap/l2c_utils.c
stack/smp/smp_l2c.c
stack/srvc/srvc_eng.c