OSDN Git Service

Use correct structure to read LE connection handle
authorNitin Arora <niarora@codeaurora.org>
Thu, 31 Jul 2014 20:00:21 +0000 (13:00 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Wed, 20 May 2015 05:19:49 +0000 (22:19 -0700)
This patch corrects the retrieval of the connection handle
after the gatt write operation has succeeded successfully.

Change-Id: Iac79a64d6c626c2349b6f1a3744ea49a521a45f4

bta/gatt/bta_gattc_act.c

index c5f7f60..b07c47b 100755 (executable)
@@ -1364,7 +1364,7 @@ void bta_gattc_read_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_OP_CMPL *p_data)
 **
 ** Function         bta_gattc_write_cmpl
 **
-** Description      read complete
+** Description      write complete
 **
 ** Returns          None.
 **
@@ -1380,7 +1380,7 @@ void bta_gattc_write_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_OP_CMPL *p_data)
 
     if (p_data->p_cmpl != NULL)
     {
-        bta_gattc_handle2id(p_clcb->p_srcb, p_data->p_cmpl->handle,
+        bta_gattc_handle2id(p_clcb->p_srcb, p_data->p_cmpl->att_value.handle,
                             &cb_data.write.srvc_id, &cb_data.write.char_id,
                             &cb_data.write.descr_type);
     }