• Home
  • Raw
  • Download

Lines Matching refs:p_ccb

174     tCONN_CB    *p_ccb;  in sdp_connect_ind()  local
177 if ((p_ccb = sdpu_allocate_ccb()) == NULL) in sdp_connect_ind()
181 p_ccb->con_state = SDP_STATE_CFG_SETUP; in sdp_connect_ind()
184 memcpy (&p_ccb->device_address[0], bd_addr, sizeof (BD_ADDR)); in sdp_connect_ind()
185 p_ccb->connection_id = l2cap_cid; in sdp_connect_ind()
209 SDP_TRACE_EVENT1 ("SDP - Rcvd L2CAP conn ind, sent config req, CID 0x%x", p_ccb->connection_id); in sdp_connect_ind()
230 tCONN_CB *p_ccb; in sdp_connect_cfm() local
234 if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL) in sdp_connect_cfm()
242 if ((result == L2CAP_CONN_OK) && (p_ccb->con_state == SDP_STATE_CONN_SETUP)) in sdp_connect_cfm()
244 p_ccb->con_state = SDP_STATE_CFG_SETUP; in sdp_connect_cfm()
264 SDP_TRACE_EVENT1 ("SDP - got conn cnf, sent cfg req, CID: 0x%x", p_ccb->connection_id); in sdp_connect_cfm()
268 …SDP_TRACE_WARNING2 ("SDP - Rcvd conn cnf with error: 0x%x CID 0x%x", result, p_ccb->connection_id… in sdp_connect_cfm()
271 if (p_ccb->p_cb || p_ccb->p_cb2) in sdp_connect_cfm()
284 if(p_ccb->p_cb) in sdp_connect_cfm()
285 (*p_ccb->p_cb)(err); in sdp_connect_cfm()
286 else if(p_ccb->p_cb2) in sdp_connect_cfm()
287 (*p_ccb->p_cb2)(err, p_ccb->user_data); in sdp_connect_cfm()
290 sdpu_release_ccb (p_ccb); in sdp_connect_cfm()
308 tCONN_CB *p_ccb; in sdp_config_ind() local
311 if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL) in sdp_config_ind()
321 p_ccb->rem_mtu_size = (L2CAP_DEFAULT_MTU > SDP_MTU_SIZE)?SDP_MTU_SIZE:L2CAP_DEFAULT_MTU; in sdp_config_ind()
326 p_ccb->rem_mtu_size = SDP_MTU_SIZE; in sdp_config_ind()
328 p_ccb->rem_mtu_size = p_cfg->mtu; in sdp_config_ind()
374 p_ccb->con_flags |= SDP_FLAGS_HIS_CFG_DONE; in sdp_config_ind()
376 if (p_ccb->con_flags & SDP_FLAGS_MY_CFG_DONE) in sdp_config_ind()
378 p_ccb->con_state = SDP_STATE_CONNECTED; in sdp_config_ind()
380 if (p_ccb->con_flags & SDP_FLAGS_IS_ORIG) in sdp_config_ind()
381 sdp_disc_connected (p_ccb); in sdp_config_ind()
384 btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_SDP, SDP_INACT_TIMEOUT); in sdp_config_ind()
402 tCONN_CB *p_ccb; in sdp_config_cfm() local
407 if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL) in sdp_config_cfm()
416 p_ccb->con_flags |= SDP_FLAGS_MY_CFG_DONE; in sdp_config_cfm()
418 if (p_ccb->con_flags & SDP_FLAGS_HIS_CFG_DONE) in sdp_config_cfm()
420 p_ccb->con_state = SDP_STATE_CONNECTED; in sdp_config_cfm()
422 if (p_ccb->con_flags & SDP_FLAGS_IS_ORIG) in sdp_config_cfm()
423 sdp_disc_connected (p_ccb); in sdp_config_cfm()
426 btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_SDP, SDP_INACT_TIMEOUT); in sdp_config_cfm()
443 sdp_disconnect(p_ccb, SDP_CFG_FAILED); in sdp_config_cfm()
460 tCONN_CB *p_ccb; in sdp_disconnect_ind() local
463 if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL) in sdp_disconnect_ind()
475 if (p_ccb->p_cb) in sdp_disconnect_ind()
476 (*p_ccb->p_cb) ((UINT16) ((p_ccb->con_state == SDP_STATE_CONNECTED) ? in sdp_disconnect_ind()
478 else if (p_ccb->p_cb2) in sdp_disconnect_ind()
479 (*p_ccb->p_cb2) ((UINT16) ((p_ccb->con_state == SDP_STATE_CONNECTED) ? in sdp_disconnect_ind()
480 SDP_SUCCESS : SDP_CONN_FAILED), p_ccb->user_data); in sdp_disconnect_ind()
483 sdpu_release_ccb (p_ccb); in sdp_disconnect_ind()
503 tCONN_CB *p_ccb; in sdp_data_ind() local
506 if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) != NULL) in sdp_data_ind()
508 if (p_ccb->con_state == SDP_STATE_CONNECTED) in sdp_data_ind()
510 if (p_ccb->con_flags & SDP_FLAGS_IS_ORIG) in sdp_data_ind()
511 sdp_disc_server_rsp (p_ccb, p_msg); in sdp_data_ind()
513 sdp_server_handle_client_req (p_ccb, p_msg); in sdp_data_ind()
518 p_ccb->con_state, l2cap_cid); in sdp_data_ind()
543 tCONN_CB *p_ccb; in sdp_conn_originate() local
547 if ((p_ccb = sdpu_allocate_ccb()) == NULL) in sdp_conn_originate()
556 p_ccb->con_flags |= SDP_FLAGS_IS_ORIG; in sdp_conn_originate()
559 memcpy (&p_ccb->device_address[0], p_bd_addr, sizeof (BD_ADDR)); in sdp_conn_originate()
562 p_ccb->con_state = SDP_STATE_CONN_SETUP; in sdp_conn_originate()
575 p_ccb->connection_id = cid; in sdp_conn_originate()
577 return (p_ccb); in sdp_conn_originate()
582 sdpu_release_ccb (p_ccb); in sdp_conn_originate()
596 void sdp_disconnect (tCONN_CB*p_ccb, UINT16 reason) in sdp_disconnect() argument
601 if ((p_ccb->con_state == SDP_STATE_CONNECTED) in sdp_disconnect()
602 && (p_ccb->con_flags & SDP_FLAGS_IS_ORIG) in sdp_disconnect()
606 if ((p_ccb->cur_uuid_idx == 0) && (p_ccb->p_db->p_first_rec)) in sdp_disconnect()
607 p_ccb->cur_uuid_idx = p_ccb->p_db->num_uuid_filters; in sdp_disconnect()
609 while (++p_ccb->cur_uuid_idx < p_ccb->p_db->num_uuid_filters) in sdp_disconnect()
612 if ((p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx].len == 2) in sdp_disconnect()
613 && (SDP_FindServiceInDb (p_ccb->p_db, in sdp_disconnect()
614 p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx].uu.uuid16, in sdp_disconnect()
618 if ((p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx].len > 2) in sdp_disconnect()
619 && (SDP_FindServiceUUIDInDb (p_ccb->p_db, in sdp_disconnect()
620 &p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx], NULL))) in sdp_disconnect()
623 p_ccb->cur_handle = 0; in sdp_disconnect()
626 p_ccb->connection_id); in sdp_disconnect()
628 sdp_disc_connected (p_ccb); in sdp_disconnect()
633 if ((reason == SDP_NO_RECS_MATCH) && (p_ccb->p_db->p_first_rec)) in sdp_disconnect()
638 SDP_TRACE_EVENT1 ("SDP - disconnect CID: 0x%x", p_ccb->connection_id); in sdp_disconnect()
641 if (p_ccb->connection_id != 0) in sdp_disconnect()
643 L2CA_DisconnectReq (p_ccb->connection_id); in sdp_disconnect()
644 p_ccb->disconnect_reason = reason; in sdp_disconnect()
649 if (p_ccb->con_state == SDP_STATE_CONN_SETUP) in sdp_disconnect()
652 if (p_ccb->p_cb) in sdp_disconnect()
653 (*p_ccb->p_cb) (reason); in sdp_disconnect()
654 else if (p_ccb->p_cb2) in sdp_disconnect()
655 (*p_ccb->p_cb2) (reason, p_ccb->user_data); in sdp_disconnect()
657 sdpu_release_ccb (p_ccb); in sdp_disconnect()
673 tCONN_CB *p_ccb; in sdp_disconnect_cfm() local
676 if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL) in sdp_disconnect_cfm()
685 if (p_ccb->p_cb) in sdp_disconnect_cfm()
686 (*p_ccb->p_cb) (p_ccb->disconnect_reason); in sdp_disconnect_cfm()
687 else if (p_ccb->p_cb2) in sdp_disconnect_cfm()
688 (*p_ccb->p_cb2) (p_ccb->disconnect_reason, p_ccb->user_data); in sdp_disconnect_cfm()
691 sdpu_release_ccb (p_ccb); in sdp_disconnect_cfm()
706 void sdp_conn_timeout (tCONN_CB*p_ccb) in sdp_conn_timeout() argument
709 p_ccb->con_state, p_ccb->connection_id); in sdp_conn_timeout()
711 L2CA_DisconnectReq (p_ccb->connection_id); in sdp_conn_timeout()
714 if (p_ccb->p_cb) in sdp_conn_timeout()
715 (*p_ccb->p_cb) (SDP_CONN_FAILED); in sdp_conn_timeout()
716 else if (p_ccb->p_cb2) in sdp_conn_timeout()
717 (*p_ccb->p_cb2) (SDP_CONN_FAILED, p_ccb->user_data); in sdp_conn_timeout()
719 sdpu_release_ccb (p_ccb); in sdp_conn_timeout()