OSDN Git Service

Process Gatt read multiple response properly
authorSubramanian Srinivasan <subrsrin@codeaurora.org>
Mon, 16 May 2016 18:14:03 +0000 (11:14 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 15 Jul 2016 17:18:36 +0000 (10:18 -0700)
commit94b4a1ad31eed7e986e6d3d1a46748d43c69b9ec
tree07d5ee3872670dc9d1413eef620da4af81e6d016
parentecfeff6782aeb61adfaf19f70e6a55ff97c3a9d6
Process Gatt read multiple response properly

The Gatt server multi response queue is made NULL after each Gatt
server response is sent by BT stack in response to the remote Gatt
client's request. But the multi response queue is not initialized
again to process subsequent read multiple Gatt server responses.
Hence, the BT stack does not send Gatt server responses for the
subsequent read multiple requests from remote device which inturn
leads to disconnection. This change would process read multiple
responses by initializing the queue when it is null.

Some of Bluetooth certification test cases involve testing
Gatt server's capability to process and send read multiple
response.

Test case: TC_GAR_SR_BV_05_C

This change also cleans up unnecessary initialization and freeing
of multi rsp queue. This change makes sure that the stack initializes
multi rsp queue only when it is necessary(ie only when the Gatt
multiple read response is being processed).

Bug: 29011255

Change-Id: Ia3e2e1569ee16cac9c518f95501945257b9fb7fd
(cherry picked from commit 3737592a7846766083041e81d72a2fab0b27fb38)
stack/gatt/gatt_main.c
stack/gatt/gatt_sr.c
stack/gatt/gatt_utils.c