Home | History | Annotate | Download | only in gatt

Lines Matching refs:p_tcb

606     tGATT_TCB       *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
610 if ( (p_reg == NULL) || (p_tcb == NULL))
625 if (GATT_HANDLE_IS_VALID(p_tcb->indicate_handle))
628 if ((p_buf = gatt_add_pending_ind(p_tcb, &indication)) !=NULL)
640 if ( (p_msg = attp_build_sr_msg (p_tcb, GATT_HANDLE_VALUE_IND, (tGATT_SR_MSG *)&indication)) != NULL)
642 cmd_status = attp_send_sr_msg (p_tcb, p_msg);
646 p_tcb->indicate_handle = indication.handle;
647 gatt_start_conf_timer(p_tcb);
677 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
681 if ( (p_reg == NULL) || (p_tcb == NULL))
694 if ((p_buf = attp_build_sr_msg (p_tcb, GATT_HANDLE_VALUE_NOTIF, (tGATT_SR_MSG *)&notif))
697 cmd_sent = attp_send_sr_msg (p_tcb, p_buf);
726 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
731 if ( (p_reg == NULL) || (p_tcb == NULL))
737 if (p_tcb->sr_cmd.trans_id != trans_id)
740 conn_id, p_tcb->sr_cmd.op_code);
745 cmd_sent = gatt_sr_process_app_rsp (p_tcb, gatt_if, trans_id, p_tcb->sr_cmd.op_code, status, p_msg);
778 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
786 if (p_tcb->transport != BT_TRANSPORT_LE)
791 if ( (p_tcb == NULL) || (p_reg==NULL) || (mtu < GATT_DEF_BLE_MTU_SIZE) || (mtu > GATT_MAX_MTU_SIZE))
804 p_clcb->p_tcb->payload_size = mtu;
807 ret = attp_send_cl_msg (p_clcb->p_tcb, p_clcb->clcb_idx, GATT_REQ_MTU, (tGATT_CL_MSG *)&mtu);
833 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
839 if ( (p_tcb == NULL) || (p_reg==NULL) ||(p_param == NULL) ||
902 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
908 if ( (p_tcb == NULL) || (p_reg==NULL) || (p_read == NULL) || ((type >= GATT_READ_MAX) || (type == 0)))
990 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
993 if ( (p_tcb == NULL) || (p_reg==NULL) || (p_write == NULL) ||
1064 tGATT_TCB *p_tcb = gatt_get_tcb_by_idx(tcb_idx);
1069 if ( (p_tcb == NULL) || (p_reg==NULL) )
1085 gatt_send_queue_write_cancel (p_clcb->p_tcb, p_clcb, flag);
1111 tGATT_TCB *p_tcb=gatt_get_tcb_by_idx(GATT_GET_TCB_IDX(conn_id));
1115 if (p_tcb)
1117 if (p_tcb->ind_count > 0 )
1119 btu_stop_timer (&p_tcb->ind_ack_timer_ent);
1121 GATT_TRACE_DEBUG ("notif_count=%d ", p_tcb->ind_count);
1123 ret = attp_send_cl_msg(p_tcb, 0, GATT_HANDLE_VALUE_CONF, (tGATT_CL_MSG *)&handle);
1125 p_tcb->ind_count = 0;
1162 tGATT_TCB *p_tcb;
1165 if ((p_tcb = gatt_find_tcb_by_addr (bd_addr, transport)) != NULL)
1167 if (p_tcb->att_lcid == L2CAP_ATT_CID)
1173 status = L2CA_SetIdleTimeout (p_tcb->att_lcid, idle_tout, FALSE);
1247 tGATT_TCB *p_tcb;
1278 for (i=0, p_tcb = gatt_cb.tcb; i < GATT_MAX_PHY_CHANNEL; i++, p_tcb++)
1280 if (p_tcb->in_use)
1282 if (gatt_get_ch_state(p_tcb) != GATT_CH_CLOSE)
1284 gatt_update_app_use_link_flag(gatt_if, p_tcb, FALSE, FALSE);
1285 if (!gatt_num_apps_hold_link(p_tcb))
1288 gatt_disconnect(p_tcb);
1296 (p_clcb->p_tcb->tcb_idx == p_tcb->tcb_idx))
1332 tGATT_TCB *p_tcb;
1345 p_tcb = gatt_find_tcb_by_addr(bda, transport);
1346 if (p_reg->app_cb.p_conn_cb && p_tcb)
1348 conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, gatt_if);
1417 tGATT_TCB *p_tcb;
1437 p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_LE);
1438 if (p_tcb && gatt_num_apps_hold_link(p_tcb))
1440 while (status && gatt_find_app_hold_link(p_tcb, start_idx, &found_idx, &temp_gatt_if))
1496 tGATT_TCB *p_tcb=NULL;
1502 p_tcb = gatt_get_tcb_by_idx(tcb_idx);
1504 if (p_tcb)
1506 gatt_update_app_use_link_flag(gatt_if, p_tcb, FALSE, FALSE);
1507 if (!gatt_num_apps_hold_link(p_tcb))
1509 gatt_disconnect(p_tcb);
1538 tGATT_TCB *p_tcb= gatt_get_tcb_by_idx(tcb_idx);
1543 if (p_tcb && p_reg )
1545 memcpy(bd_addr, p_tcb->peer_bda, BD_ADDR_LEN);
1547 *p_transport = p_tcb->transport;
1573 tGATT_TCB *p_tcb= gatt_find_tcb_by_addr(bd_addr, transport);
1576 if (p_reg && p_tcb && (gatt_get_ch_state(p_tcb) == GATT_CH_OPEN) )
1578 *p_conn_id = GATT_CREATE_CONN_ID(p_tcb->tcb_idx, gatt_if);