• Home
  • Raw
  • Download

Lines Matching refs:p_ccb

119   tCONN_CB* p_ccb = sdpu_allocate_ccb();  in sdp_connect_ind()  local
120 if (p_ccb == NULL) return; in sdp_connect_ind()
123 p_ccb->con_state = SDP_STATE_CFG_SETUP; in sdp_connect_ind()
126 p_ccb->device_address = bd_addr; in sdp_connect_ind()
127 p_ccb->connection_id = l2cap_cid; in sdp_connect_ind()
131 tCONN_CB* p_ccb = sdpu_find_ccb_by_cid(l2cap_cid); in sdp_on_l2cap_error() local
132 if (p_ccb == nullptr) return; in sdp_on_l2cap_error()
133 sdp_disconnect(p_ccb, SDP_CFG_FAILED); in sdp_on_l2cap_error()
148 tCONN_CB* p_ccb; in sdp_connect_cfm() local
151 p_ccb = sdpu_find_ccb_by_cid(l2cap_cid); in sdp_connect_cfm()
152 if (p_ccb == NULL) { in sdp_connect_cfm()
159 if ((result == L2CAP_CONN_OK) && (p_ccb->con_state == SDP_STATE_CONN_SETUP)) { in sdp_connect_cfm()
160 p_ccb->con_state = SDP_STATE_CFG_SETUP; in sdp_connect_cfm()
177 tCONN_CB* p_ccb; in sdp_config_ind() local
180 p_ccb = sdpu_find_ccb_by_cid(l2cap_cid); in sdp_config_ind()
181 if (p_ccb == NULL) { in sdp_config_ind()
189 p_ccb->rem_mtu_size = in sdp_config_ind()
193 p_ccb->rem_mtu_size = SDP_MTU_SIZE; in sdp_config_ind()
195 p_ccb->rem_mtu_size = p_cfg->mtu; in sdp_config_ind()
215 tCONN_CB* p_ccb; in sdp_config_cfm() local
220 p_ccb = sdpu_find_ccb_by_cid(l2cap_cid); in sdp_config_cfm()
221 if (p_ccb == NULL) { in sdp_config_cfm()
227 p_ccb->con_state = SDP_STATE_CONNECTED; in sdp_config_cfm()
229 if (p_ccb->con_flags & SDP_FLAGS_IS_ORIG) { in sdp_config_cfm()
230 sdp_disc_connected(p_ccb); in sdp_config_cfm()
233 alarm_set_on_mloop(p_ccb->sdp_conn_timer, SDP_INACT_TIMEOUT_MS, in sdp_config_cfm()
234 sdp_conn_timer_timeout, p_ccb); in sdp_config_cfm()
249 tCONN_CB* p_ccb; in sdp_disconnect_ind() local
252 p_ccb = sdpu_find_ccb_by_cid(l2cap_cid); in sdp_disconnect_ind()
253 if (p_ccb == NULL) { in sdp_disconnect_ind()
260 if (p_ccb->p_cb) in sdp_disconnect_ind()
261 (*p_ccb->p_cb)(((p_ccb->con_state == SDP_STATE_CONNECTED) in sdp_disconnect_ind()
264 else if (p_ccb->p_cb2) in sdp_disconnect_ind()
265 (*p_ccb->p_cb2)( in sdp_disconnect_ind()
266 ((p_ccb->con_state == SDP_STATE_CONNECTED) ? SDP_SUCCESS in sdp_disconnect_ind()
268 p_ccb->user_data); in sdp_disconnect_ind()
270 sdpu_release_ccb(p_ccb); in sdp_disconnect_ind()
289 tCONN_CB* p_ccb; in sdp_data_ind() local
292 p_ccb = sdpu_find_ccb_by_cid(l2cap_cid); in sdp_data_ind()
293 if (p_ccb != NULL) { in sdp_data_ind()
294 if (p_ccb->con_state == SDP_STATE_CONNECTED) { in sdp_data_ind()
295 if (p_ccb->con_flags & SDP_FLAGS_IS_ORIG) in sdp_data_ind()
296 sdp_disc_server_rsp(p_ccb, p_msg); in sdp_data_ind()
298 sdp_server_handle_client_req(p_ccb, p_msg); in sdp_data_ind()
302 p_ccb->con_state, l2cap_cid); in sdp_data_ind()
322 tCONN_CB* p_ccb; in sdp_conn_originate() local
326 p_ccb = sdpu_allocate_ccb(); in sdp_conn_originate()
327 if (p_ccb == NULL) { in sdp_conn_originate()
337 p_ccb->con_flags |= SDP_FLAGS_IS_ORIG; in sdp_conn_originate()
340 p_ccb->device_address = p_bd_addr; in sdp_conn_originate()
344 p_ccb->con_state = SDP_STATE_CONN_SETUP; in sdp_conn_originate()
352 sdpu_release_ccb(p_ccb); in sdp_conn_originate()
355 p_ccb->connection_id = cid; in sdp_conn_originate()
356 return (p_ccb); in sdp_conn_originate()
368 void sdp_disconnect(tCONN_CB* p_ccb, tSDP_REASON reason) { in sdp_disconnect() argument
369 SDP_TRACE_EVENT("SDP - disconnect CID: 0x%x", p_ccb->connection_id); in sdp_disconnect()
372 if (p_ccb->connection_id != 0) { in sdp_disconnect()
373 L2CA_DisconnectReq(p_ccb->connection_id); in sdp_disconnect()
374 p_ccb->disconnect_reason = reason; in sdp_disconnect()
378 if (p_ccb->p_cb) in sdp_disconnect()
379 (*p_ccb->p_cb)(reason); in sdp_disconnect()
380 else if (p_ccb->p_cb2) in sdp_disconnect()
381 (*p_ccb->p_cb2)(reason, p_ccb->user_data); in sdp_disconnect()
383 sdpu_release_ccb(p_ccb); in sdp_disconnect()
397 tCONN_CB* p_ccb = (tCONN_CB*)data; in sdp_conn_timer_timeout() local
399 SDP_TRACE_EVENT("SDP - CCB timeout in state: %d CID: 0x%x", p_ccb->con_state, in sdp_conn_timer_timeout()
400 p_ccb->connection_id); in sdp_conn_timer_timeout()
402 L2CA_DisconnectReq(p_ccb->connection_id); in sdp_conn_timer_timeout()
404 if (p_ccb->p_cb) in sdp_conn_timer_timeout()
405 (*p_ccb->p_cb)(SDP_CONN_FAILED); in sdp_conn_timer_timeout()
406 else if (p_ccb->p_cb2) in sdp_conn_timer_timeout()
407 (*p_ccb->p_cb2)(SDP_CONN_FAILED, p_ccb->user_data); in sdp_conn_timer_timeout()
408 sdpu_release_ccb(p_ccb); in sdp_conn_timer_timeout()