• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

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

system/bt


コミットメタ情報

リビジョン1095bf35c437306d42987be344d67da29cb82dcd (tree)
日時2019-05-30 16:00:51
作者weichinweng <weichinweng@goog...>
コミッターandroid-build-merger

ログメッセージ

Merge "Open connection if it doesn't exsist in bta_gattc_process_indicate" into qt-dev
am: 8c3e9415af

Change-Id: I7bc7abd759f0ef495a592998f205da7a720d732f

変更サマリ

差分

--- a/bta/gatt/bta_gattc_act.cc
+++ b/bta/gatt/bta_gattc_act.cc
@@ -1240,6 +1240,20 @@ 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+ }
12431257
12441258 notify.handle = handle;
12451259
@@ -1250,21 +1264,6 @@ void bta_gattc_process_indicate(uint16_t conn_id, tGATTC_OPTYPE op,
12501264
12511265 /* if app registered for the notification */
12521266 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-
12681267 if (p_clcb != NULL)
12691268 bta_gattc_proc_other_indication(p_clcb, op, p_data, &notify);
12701269 }