diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2015-11-17 10:47:07 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-11-17 10:47:07 -0800 |
commit | 99accc2b989d5785e1f41eca18236760a2cc2ec4 (patch) | |
tree | 29a119c77fedb9446b7b82aea24cdada6bc5d0d4 | |
parent | a8dc3a310b9f4547d1ddf759038c4054b6763d5b (diff) | |
parent | 75fb90d3938f4de3691f1cbc056586cdf7d61afc (diff) | |
download | android_system_bt-99accc2b989d5785e1f41eca18236760a2cc2ec4.tar.gz android_system_bt-99accc2b989d5785e1f41eca18236760a2cc2ec4.tar.bz2 android_system_bt-99accc2b989d5785e1f41eca18236760a2cc2ec4.zip |
Merge "Avoid indications/notifications without clcb allocation" into LA.BF.1.1.3_rb1.4
-rwxr-xr-x | bta/gatt/bta_gattc_act.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bta/gatt/bta_gattc_act.c b/bta/gatt/bta_gattc_act.c index f62468d1c..078de1271 100755 --- a/bta/gatt/bta_gattc_act.c +++ b/bta/gatt/bta_gattc_act.c @@ -2146,15 +2146,17 @@ static void bta_gattc_cmpl_cback(UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATUS APPL_TRACE_DEBUG("bta_gattc_cmpl_cback: conn_id = %d op = %d status = %d", conn_id, op, status); + p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id); + tGATT_IF gatt_if = ((tGATT_IF)((UINT8) (conn_id))); /* notification and indication processed right away */ - if (op == GATTC_OPTYPE_NOTIFICATION || op == GATTC_OPTYPE_INDICATION) + if ((op == GATTC_OPTYPE_NOTIFICATION || op == GATTC_OPTYPE_INDICATION) && + (p_clcb || !bta_hh_le_is_hh_gatt_if(gatt_if))) { bta_gattc_process_indicate(conn_id, op, p_data); return; } - /* for all other operation, not expected if w/o connection */ - else if ((p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id)) == NULL) + else if (p_clcb == NULL) { APPL_TRACE_ERROR("bta_gattc_cmpl_cback unknown conn_id = %d, ignore data", conn_id); return; |