Lines Matching refs:p_srcb
110 void bta_gattc_reset_discover_st(tBTA_GATTC_SERV* p_srcb, tGATT_STATUS status);
462 VLOG(1) << __func__ << ": server cache state=" << +p_clcb->p_srcb->state; in bta_gattc_conn()
472 p_clcb->p_srcb->connected = true; in bta_gattc_conn()
474 if (p_clcb->p_srcb->mtu == 0) p_clcb->p_srcb->mtu = GATT_DEF_BLE_MTU_SIZE; in bta_gattc_conn()
477 if (p_clcb->p_srcb->gatt_database.IsEmpty() || in bta_gattc_conn()
478 p_clcb->p_srcb->state != BTA_GATTC_SERV_IDLE) { in bta_gattc_conn()
479 if (p_clcb->p_srcb->state == BTA_GATTC_SERV_IDLE) { in bta_gattc_conn()
480 p_clcb->p_srcb->state = BTA_GATTC_SERV_LOAD; in bta_gattc_conn()
481 if (bta_gattc_cache_load(p_clcb->p_srcb)) { in bta_gattc_conn()
482 p_clcb->p_srcb->state = BTA_GATTC_SERV_IDLE; in bta_gattc_conn()
483 bta_gattc_reset_discover_st(p_clcb->p_srcb, GATT_SUCCESS); in bta_gattc_conn()
485 p_clcb->p_srcb->state = BTA_GATTC_SERV_DISC; in bta_gattc_conn()
495 if (p_clcb->p_srcb->srvc_hdl_chg) { in bta_gattc_conn()
496 p_clcb->p_srcb->srvc_hdl_chg = false; in bta_gattc_conn()
509 p_clcb->p_srcb->mtu); in bta_gattc_conn()
566 void bta_gattc_reset_discover_st(tBTA_GATTC_SERV* p_srcb, tGATT_STATUS status) { in bta_gattc_reset_discover_st() argument
568 if (bta_gattc_cb.clcb[i].p_srcb == p_srcb) { in bta_gattc_reset_discover_st()
582 bta_gattc_reset_discover_st(p_clcb->p_srcb, GATT_ERROR); in bta_gattc_disc_close()
596 void bta_gattc_set_discover_st(tBTA_GATTC_SERV* p_srcb) { in bta_gattc_set_discover_st() argument
600 if (bta_gattc_cb.clcb[i].p_srcb == p_srcb) { in bta_gattc_set_discover_st()
637 << " p_clcb->p_srcb->state:" << +p_clcb->p_srcb->state; in bta_gattc_start_discover()
641 p_clcb->p_srcb->state == BTA_GATTC_SERV_IDLE) || in bta_gattc_start_discover()
642 p_clcb->p_srcb->state == BTA_GATTC_SERV_DISC) in bta_gattc_start_discover()
647 if (p_clcb->p_srcb != NULL) { in bta_gattc_start_discover()
649 p_clcb->p_srcb->srvc_hdl_chg = false; in bta_gattc_start_discover()
650 p_clcb->p_srcb->update_count = 0; in bta_gattc_start_discover()
651 p_clcb->p_srcb->state = BTA_GATTC_SERV_DISC_ACT; in bta_gattc_start_discover()
654 L2CA_EnableUpdateBleConnParams(p_clcb->p_srcb->server_bda, false); in bta_gattc_start_discover()
657 bta_gattc_set_discover_st(p_clcb->p_srcb); in bta_gattc_start_discover()
659 bta_gattc_init_cache(p_clcb->p_srcb); in bta_gattc_start_discover()
661 p_clcb->bta_conn_id, p_clcb->p_srcb, GATT_DISC_SRVC_ALL); in bta_gattc_start_discover()
664 bta_gattc_reset_discover_st(p_clcb->p_srcb, p_clcb->status); in bta_gattc_start_discover()
675 if (p_clcb->p_srcb->state == BTA_GATTC_SERV_IDLE) in bta_gattc_start_discover()
688 L2CA_EnableUpdateBleConnParams(p_clcb->p_srcb->server_bda, true); in bta_gattc_disc_cmpl()
689 p_clcb->p_srcb->state = BTA_GATTC_SERV_IDLE; in bta_gattc_disc_cmpl()
694 if (p_clcb->p_srcb) { in bta_gattc_disc_cmpl()
695 p_clcb->p_srcb->gatt_database.Clear(); in bta_gattc_disc_cmpl()
699 bta_gattc_cache_reset(p_clcb->p_srcb->server_bda); in bta_gattc_disc_cmpl()
702 if (p_clcb->p_srcb) { in bta_gattc_disc_cmpl()
703 p_clcb->p_srcb->pending_discovery.Clear(); in bta_gattc_disc_cmpl()
715 if (l2cu_find_lcb_by_bd_addr(p_clcb->p_srcb->server_bda, in bta_gattc_disc_cmpl()
728 bta_gattc.remote_bda = p_clcb->p_srcb->server_bda; in bta_gattc_disc_cmpl()
904 p_clcb->p_srcb->mtu = p_data->p_cmpl->mtu; in bta_gattc_cfg_mtu_cmpl()
910 cb_data.cfg_mtu.mtu = p_clcb->p_srcb->mtu; in bta_gattc_cfg_mtu_cmpl()
951 p_clcb->p_srcb->srvc_hdl_chg && op != GATTC_OPTYPE_CONFIG) { in bta_gattc_op_cmpl()
989 if (p_clcb->p_srcb && !p_clcb->p_srcb->gatt_database.IsEmpty()) { in bta_gattc_search()
1101 if (p_clcb->in_use && p_clcb->p_srcb == p_srvc_cb) { in bta_gattc_process_api_refresh()
1122 tBTA_GATTC_SERV* p_srcb, in bta_gattc_process_srvc_chg_ind() argument
1130 if (p_srcb->gatt_database.IsEmpty() && p_srcb->state == BTA_GATTC_SERV_IDLE) { in bta_gattc_process_srvc_chg_ind()
1131 bta_gattc_cache_load(p_srcb); in bta_gattc_process_srvc_chg_ind()
1135 bta_gattc_get_characteristic_srcb(p_srcb, p_notify->handle); in bta_gattc_process_srvc_chg_ind()
1138 bta_gattc_get_service_for_handle_srcb(p_srcb, p_char->value_handle); in bta_gattc_process_srvc_chg_ind()
1157 p_srcb->srvc_hdl_chg = true; in bta_gattc_process_srvc_chg_ind()
1159 bta_gattc_clear_notif_registration(p_srcb, conn_id, s_handle, e_handle); in bta_gattc_process_srvc_chg_ind()
1161 if (++p_srcb->update_count == bta_gattc_num_reg_app()) { in bta_gattc_process_srvc_chg_ind()
1167 bta_gattc_cb.clcb[i].p_srcb == p_srcb && in bta_gattc_process_srvc_chg_ind()
1184 bta_gattc.remote_bda = p_srcb->server_bda; in bta_gattc_process_srvc_chg_ind()
1238 tBTA_GATTC_SERV* p_srcb = bta_gattc_find_srcb(remote_bda); in bta_gattc_process_indicate() local
1239 if (p_srcb == NULL) { in bta_gattc_process_indicate()
1251 if (bta_gattc_process_srvc_chg_ind(conn_id, p_clrcb, p_srcb, p_clcb, ¬ify, in bta_gattc_process_indicate()
1256 if (bta_gattc_check_notif_registry(p_clrcb, p_srcb, ¬ify)) { in bta_gattc_process_indicate()