Lines Matching refs:conn_id
34 static void srvc_eng_s_request_cback (UINT16 conn_id, UINT32 trans_id, UINT8 op_code, tGATTS_DATA *p_data);
35 static void srvc_eng_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id, BOOLEAN connected,
37 static void srvc_eng_c_cmpl_cback (UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATUS status, tGATT_CL_COMPLETE *p_data);
78 return p_clcb->conn_id;
118 tSRVC_CLCB *srvc_eng_find_clcb_by_conn_id(UINT16 conn_id)
125 if (p_clcb->in_use && p_clcb->connected && p_clcb->conn_id == conn_id)
142 UINT8 srvc_eng_find_clcb_idx_by_conn_id(UINT16 conn_id)
149 if (p_clcb->in_use && p_clcb->connected && p_clcb->conn_id == conn_id)
166 tSRVC_CLCB *srvc_eng_clcb_alloc (UINT16 conn_id, BD_ADDR bda)
176 p_clcb->conn_id = conn_id;
193 BOOLEAN srvc_eng_clcb_dealloc (UINT16 conn_id)
200 if (p_clcb->in_use && p_clcb->connected && (p_clcb->conn_id == conn_id))
268 static void srvc_eng_s_request_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_REQ_TYPE type,
274 UINT8 clcb_idx = srvc_eng_find_clcb_idx_by_conn_id(conn_id);
310 GATTS_SendRsp (conn_id, trans_id, status, &rsp_msg);
325 static void srvc_eng_c_cmpl_cback (UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATUS status,
328 tSRVC_CLCB *p_clcb = srvc_eng_find_clcb_by_conn_id(conn_id);
353 static void srvc_eng_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_id,
359 GATT_TRACE_EVENT ("srvc_eng_connect_cback: from %08x%04x connected:%d conn_id=%d reason = 0x%04x",
361 (bda[4]<<8)+bda[5], connected, conn_id, reason);
365 if (srvc_eng_clcb_alloc(conn_id, bda) == NULL)
373 srvc_eng_clcb_dealloc(conn_id);
410 void srvc_eng_release_channel (UINT16 conn_id)
412 tSRVC_CLCB *p_clcb = srvc_eng_find_clcb_by_conn_id(conn_id);
416 GATT_TRACE_ERROR("%s: invalid connection id %d", __FUNCTION__, conn_id);
423 GATT_Disconnect(p_clcb->conn_id);
462 GATTS_SendRsp(srvc_eng_cb.clcb[clcb_idx].conn_id,
472 UINT16 conn_id = srvc_eng_find_conn_id_by_bd_addr(remote_bda);
474 if (conn_id != GATT_INVALID_CONN_ID)
476 GATTS_HandleValueNotification( conn_id, handle, len, p_value);