• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

Revisione05ea5ed112343badf5bd3d5632214b74527eb4d (tree)
Zeit2019-06-12 07:01:23
AutorJakub Pawlowski <jpawlowski@goog...>
Commiterandroid-build-merger

Log Message

Revert "Open connection if it doesn't exsist in bta_gattc_process_indicate"
am: 1ae89b7db2

Change-Id: I7dd5e73de79498e378d24140a3ff4790a4138dac

Ändern Zusammenfassung

Diff

--- a/bta/gatt/bta_gattc_act.cc
+++ b/bta/gatt/bta_gattc_act.cc
@@ -1240,20 +1240,6 @@ void bta_gattc_process_indicate(uint16_t conn_id, tGATTC_OPTYPE op,
12401240 }
12411241
12421242 tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id);
1243- /* connection not open yet */
1244- if (p_clcb == NULL) {
1245- p_clcb = bta_gattc_clcb_alloc(gatt_if, remote_bda, transport);
1246-
1247- if (p_clcb == NULL) {
1248- LOG(ERROR) << __func__ << ": No resources";
1249- return;
1250- }
1251-
1252- p_clcb->bta_conn_id = conn_id;
1253- p_clcb->transport = transport;
1254-
1255- bta_gattc_sm_execute(p_clcb, BTA_GATTC_INT_CONN_EVT, NULL);
1256- }
12571243
12581244 notify.handle = handle;
12591245
@@ -1264,6 +1250,21 @@ void bta_gattc_process_indicate(uint16_t conn_id, tGATTC_OPTYPE op,
12641250
12651251 /* if app registered for the notification */
12661252 if (bta_gattc_check_notif_registry(p_clrcb, p_srcb, &notify)) {
1253+ /* connection not open yet */
1254+ if (p_clcb == NULL) {
1255+ p_clcb = bta_gattc_clcb_alloc(gatt_if, remote_bda, transport);
1256+
1257+ if (p_clcb == NULL) {
1258+ LOG(ERROR) << "No resources";
1259+ return;
1260+ }
1261+
1262+ p_clcb->bta_conn_id = conn_id;
1263+ p_clcb->transport = transport;
1264+
1265+ bta_gattc_sm_execute(p_clcb, BTA_GATTC_INT_CONN_EVT, NULL);
1266+ }
1267+
12671268 if (p_clcb != NULL)
12681269 bta_gattc_proc_other_indication(p_clcb, op, p_data, &notify);
12691270 }