summaryrefslogtreecommitdiffstats
path: root/stack/gatt
diff options
context:
space:
mode:
authorMudumba Ananth <ananthm@broadcom.com>2014-07-04 03:45:11 -0700
committerAndre Eisenbach <eisenbach@google.com>2014-07-30 16:46:40 -0700
commitcf3103308da07eba540b5918cdc472bc7fbcd1fb (patch)
tree2b9cc9a6069b94e0dbc6496a8176153590cf48be /stack/gatt
parent4a7ad9be81cc2b515502f2c1fb1b7ec7e3104146 (diff)
downloadandroid_system_bt-cf3103308da07eba540b5918cdc472bc7fbcd1fb.tar.gz
android_system_bt-cf3103308da07eba540b5918cdc472bc7fbcd1fb.tar.bz2
android_system_bt-cf3103308da07eba540b5918cdc472bc7fbcd1fb.zip
Execute Write Response shall be sent after the attributes are written
Bug: 16560957 Change-Id: I085a2218644615bc13f5a0d0d78fc2afe0605a04
Diffstat (limited to 'stack/gatt')
-rw-r--r--stack/gatt/gatt_api.c7
-rwxr-xr-x[-rw-r--r--]stack/gatt/gatt_sr.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/stack/gatt/gatt_api.c b/stack/gatt/gatt_api.c
index 0ae97233e..6683cb6cd 100644
--- a/stack/gatt/gatt_api.c
+++ b/stack/gatt/gatt_api.c
@@ -782,8 +782,11 @@ tGATT_STATUS GATTC_ConfigureMTU (UINT16 conn_id, UINT16 mtu)
GATT_TRACE_API ("GATTC_ConfigureMTU conn_id=%d mtu=%d", conn_id, mtu );
- // Validate that the link is BLE, not BR/EDR
- // ????
+ /* Validate that the link is BLE, not BR/EDR */
+ if (p_tcb->transport != BT_TRANSPORT_LE)
+ {
+ return GATT_ERROR;
+ }
if ( (p_tcb == NULL) || (p_reg==NULL) || (mtu < GATT_DEF_BLE_MTU_SIZE) || (mtu > GATT_MAX_MTU_SIZE))
{
diff --git a/stack/gatt/gatt_sr.c b/stack/gatt/gatt_sr.c
index 69e7b0d23..21997946b 100644..100755
--- a/stack/gatt/gatt_sr.c
+++ b/stack/gatt/gatt_sr.c
@@ -379,12 +379,7 @@ void gatt_process_exec_write_req (tGATT_TCB *p_tcb, UINT8 op_code, UINT16 len, U
else /* nothing needs to be executed , send response now */
{
GATT_TRACE_ERROR("gatt_process_exec_write_req: no prepare write pending");
-
- if ((p_buf = attp_build_sr_msg(p_tcb, GATT_RSP_EXEC_WRITE, NULL)) != NULL)
- {
- attp_send_sr_msg (p_tcb, p_buf);
- }
-
+ gatt_send_error_rsp(p_tcb, GATT_ERROR, GATT_REQ_EXEC_WRITE, 0, FALSE);
}
}