OSDN Git Service

Disconnect Gatt during failure of service changed discovery process
authorNitin Arora <niarora@codeaurora.org>
Fri, 20 Mar 2015 01:06:41 +0000 (18:06 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Wed, 17 Jun 2015 20:20:59 +0000 (13:20 -0700)
Gatt service changed discovery holds link till it completes discovery of service,
characteristics, descriptots and writing notification for characteristic descriptor,
this change takes care of removing  the link if service discovery fails during any
stage of this process.

Bug: 21896912
Change-Id: Ie97a039568fedc66403895e7e917e4d72a5419e1

stack/gatt/gatt_attr.c

index fe3fcc4..a175129 100644 (file)
@@ -375,6 +375,8 @@ static void gatt_disc_cmpl_cback (UINT16 conn_id, tGATT_DISC_TYPE disc_type, tGA
         gatt_cl_start_config_ccc(p_clcb);
     } else {
         GATT_TRACE_ERROR("%s() - Register for service changed indication failure", __FUNCTION__);
+        /* free the connection */
+        gatt_config_ccc_complete (p_clcb);
     }
 }