OSDN Git Service

HOGP: Clear pending operations for a given device on disconnect
authorJakub Pawlowski <jpawlowski@google.com>
Fri, 10 Jun 2016 23:32:26 +0000 (16:32 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 10 Jun 2016 23:52:40 +0000 (23:52 +0000)
If there are any GATT operations interrupted by a disconnect, mark the
device as no longer executing. Otherwise we'll stil receive data from
the device, but we'll be unable to send any HID commands to it.

Bug: 29184976
Change-Id: I489f41c970abad0ff1145005d3250beafa83d27e

bta/hh/bta_hh_le.c

index 4aefd5d..675ef37 100644 (file)
@@ -131,6 +131,8 @@ static bool rm_op_by_conn_id(void *data, void *context) {
 static void gatt_op_queue_clean(UINT16 conn_id) {
     if (gatt_op_queue)
         list_foreach(gatt_op_queue, rm_op_by_conn_id, &conn_id);
+
+    mark_as_not_executing(conn_id);
 }
 
 static bool find_op_by_conn_id(void *data, void *context) {