OSDN Git Service

Fix for GATT not returning disconnect callback.
authorJakub Pawlowski <jpawlowski@google.com>
Tue, 2 Apr 2019 17:21:14 +0000 (19:21 +0200)
committerJakub Pawlowski <jpawlowski@google.com>
Tue, 2 Apr 2019 21:10:24 +0000 (21:10 +0000)
commit8edcc90e4524fe48dbc72f7020c50634271e3289
tree9c5b4262c83b40f34a4a2b7f14b28ca8cd780568
parent98695adc1cfaefef08ee35554c718419925d30c1
Fix for GATT not returning disconnect callback.

Before recent refactor GATT was using the L2CAP layer to start LE
connections. Since the refactor, GATT talks directly to added
connection_manager, just like L2CAP.
L2CAP does have it's own timer for direct connections, that was
returning conneciton failure after timeout. After switching to
connection_manager, GATT no longer receives those callbacks.

This patch makes the connection_manager send the on_connection_timed_out
callback, and wire it to same handler that L2CAP layer was using before.

Test: unit tests added
Bug: 125553095
Change-Id: Iaf8be46fe8eed49f78ddbc6a2f3516bc8279e91f
stack/gatt/connection_manager.cc
stack/gatt/connection_manager.h
stack/gatt/gatt_main.cc
stack/test/gatt_connection_manager_test.cc