• Home
  • Raw
  • Download

Lines Matching refs:p_ccb

48 static void          process_service_search_rsp (tCONN_CB *p_ccb, UINT8 *p_reply, UINT16 len);
49 static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply, UINT16 len);
50 static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply, UINT16 len);
51 static UINT8 *save_attr_seq (tCONN_CB *p_ccb, UINT8 *p, UINT8 *p_msg_end);
119 static void sdp_snd_service_search_req(tCONN_CB *p_ccb, UINT8 cont_len, UINT8 * p_cont) in sdp_snd_service_search_req() argument
128 sdp_disconnect (p_ccb, SDP_NO_RESOURCES); in sdp_snd_service_search_req()
137 UINT16_TO_BE_STREAM (p, p_ccb->transaction_id); in sdp_snd_service_search_req()
138 p_ccb->transaction_id++; in sdp_snd_service_search_req()
146 p = sdpu_build_uuid_seq (p, 1, &p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx]); in sdp_snd_service_search_req()
148 p = sdpu_build_uuid_seq (p, p_ccb->p_db->num_uuid_filters, p_ccb->p_db->uuid_filters); in sdp_snd_service_search_req()
168 p_ccb->disc_state = SDP_DISC_WAIT_HANDLES; in sdp_snd_service_search_req()
174 …SDP_TRACE_WARNING2("sdp_snd_service_search_req cont_len :%d disc_state:%d",cont_len, p_ccb->disc_s… in sdp_snd_service_search_req()
178 L2CA_DataWrite (p_ccb->connection_id, p_cmd); in sdp_snd_service_search_req()
181 btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_SDP, SDP_INACT_TIMEOUT); in sdp_snd_service_search_req()
195 void sdp_disc_connected (tCONN_CB *p_ccb) in sdp_disc_connected() argument
199 if (SDP_IS_PASS_THRU == p_ccb->is_attr_search) in sdp_disc_connected()
201 tSDP_DISC_RES_CB *p_rcb = (tSDP_DISC_RES_CB *) p_ccb->p_db; in sdp_disc_connected()
204 p_ccb->disc_state = SDP_DISC_WAIT_PASS_THRU; in sdp_disc_connected()
207 memcpy(evt_data.peer_addr, p_ccb->device_address, BD_ADDR_LEN); in sdp_disc_connected()
208 evt_data.peer_mtu = p_ccb->rem_mtu_size; in sdp_disc_connected()
214 if (p_ccb->is_attr_search) in sdp_disc_connected()
216 p_ccb->disc_state = SDP_DISC_WAIT_SEARCH_ATTR; in sdp_disc_connected()
218 process_service_search_attr_rsp (p_ccb, NULL, 0); in sdp_disc_connected()
226 p_ccb->num_handles = 0; in sdp_disc_connected()
227 sdp_snd_service_search_req(p_ccb, 0, NULL); in sdp_disc_connected()
242 void sdp_disc_server_rsp (tCONN_CB *p_ccb, BT_HDR *p_msg) in sdp_disc_server_rsp() argument
248 SDP_TRACE_WARNING1("sdp_disc_server_rsp disc_state:%d", p_ccb->disc_state); in sdp_disc_server_rsp()
252 btu_stop_timer (&p_ccb->timer_entry); in sdp_disc_server_rsp()
255 if(SDP_IS_PASS_THRU == p_ccb->is_attr_search) in sdp_disc_server_rsp()
257 tSDP_DISC_RES_CB *p_rcb = (tSDP_DISC_RES_CB *) p_ccb->p_db; in sdp_disc_server_rsp()
279 if (p_ccb->disc_state == SDP_DISC_WAIT_HANDLES) in sdp_disc_server_rsp()
281 process_service_search_rsp (p_ccb, p, p_msg->len); in sdp_disc_server_rsp()
287 if (p_ccb->disc_state == SDP_DISC_WAIT_ATTR) in sdp_disc_server_rsp()
289 process_service_attr_rsp (p_ccb, p, p_msg->len); in sdp_disc_server_rsp()
295 if (p_ccb->disc_state == SDP_DISC_WAIT_SEARCH_ATTR) in sdp_disc_server_rsp()
297 process_service_search_attr_rsp (p_ccb, p, p_msg->len); in sdp_disc_server_rsp()
305 SDP_TRACE_WARNING2 ("SDP - Unexp. PDU: %d in state: %d", rsp_pdu, p_ccb->disc_state); in sdp_disc_server_rsp()
306 sdp_disconnect (p_ccb, SDP_GENERIC_ERROR); in sdp_disc_server_rsp()
320 static void process_service_search_rsp (tCONN_CB *p_ccb, UINT8 *p_reply, UINT16 len) in process_service_search_rsp() argument
331 orig = p_ccb->num_handles; in process_service_search_rsp()
332 p_ccb->num_handles += cur_handles; in process_service_search_rsp()
333 if (p_ccb->num_handles == 0) in process_service_search_rsp()
336 sdp_disconnect (p_ccb, SDP_NO_RECS_MATCH); in process_service_search_rsp()
343 if (p_ccb->num_handles > sdp_cb.max_recs_per_search) in process_service_search_rsp()
344 p_ccb->num_handles = sdp_cb.max_recs_per_search; in process_service_search_rsp()
346 for (xx = orig; xx < p_ccb->num_handles; xx++) in process_service_search_rsp()
347 BE_STREAM_TO_UINT32 (p_ccb->handles[xx], p_reply); in process_service_search_rsp()
354 sdp_disconnect (p_ccb, SDP_INVALID_CONT_STATE); in process_service_search_rsp()
358 sdp_snd_service_search_req(p_ccb, cont_len, p_reply); in process_service_search_rsp()
363 p_ccb->disc_state = SDP_DISC_WAIT_ATTR; in process_service_search_rsp()
366 process_service_attr_rsp (p_ccb, NULL, 0); in process_service_search_rsp()
381 static void sdp_copy_raw_data (tCONN_CB *p_ccb, UINT16 len, BOOLEAN offset) in sdp_copy_raw_data() argument
394 for (i = 0; i < p_ccb->list_len; i++) in sdp_copy_raw_data()
396 sprintf((char *)&num_array[i*2],"%02X",(UINT8)(p_ccb->rsp_list[i])); in sdp_copy_raw_data()
401 if(p_ccb->p_db->raw_data) in sdp_copy_raw_data()
403 cpy_len = p_ccb->p_db->raw_size - p_ccb->p_db->raw_used; in sdp_copy_raw_data()
404 list_len = p_ccb->list_len; in sdp_copy_raw_data()
405 p_temp = p = &p_ccb->rsp_list[0]; in sdp_copy_raw_data()
418 list_len, cpy_len, p_ccb->p_db->raw_size, p_ccb->p_db->raw_used); in sdp_copy_raw_data()
420 memcpy (&p_ccb->p_db->raw_data[p_ccb->p_db->raw_used], p, cpy_len); in sdp_copy_raw_data()
421 p_ccb->p_db->raw_used += cpy_len; in sdp_copy_raw_data()
436 static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply, UINT16 len) in process_service_attr_rsp() argument
462 if ((p_ccb->list_len + list_byte_count) > SDP_MAX_LIST_BYTE_COUNT) in process_service_attr_rsp()
464 sdp_disconnect (p_ccb, SDP_INVALID_PDU_SIZE); in process_service_attr_rsp()
470 p_ccb->list_len, list_byte_count); in process_service_attr_rsp()
472 if (p_ccb->rsp_list == NULL) in process_service_attr_rsp()
474 p_ccb->rsp_list = (UINT8 *)GKI_getbuf (SDP_MAX_LIST_BYTE_COUNT); in process_service_attr_rsp()
475 if (p_ccb->rsp_list == NULL) in process_service_attr_rsp()
478 sdp_disconnect (p_ccb, SDP_NO_RESOURCES); in process_service_attr_rsp()
482 memcpy (&p_ccb->rsp_list[p_ccb->list_len], p_reply, list_byte_count); in process_service_attr_rsp()
483 p_ccb->list_len += list_byte_count; in process_service_attr_rsp()
486 SDP_TRACE_WARNING1("list_len: %d(attr_rsp)", p_ccb->list_len); in process_service_attr_rsp()
495 sdp_disconnect (p_ccb, SDP_INVALID_CONT_STATE); in process_service_attr_rsp()
505 sdp_copy_raw_data (p_ccb, len, FALSE); in process_service_attr_rsp()
509 if (!save_attr_seq (p_ccb, &p_ccb->rsp_list[0], &p_ccb->rsp_list[p_ccb->list_len])) in process_service_attr_rsp()
511 sdp_disconnect (p_ccb, SDP_DB_FULL); in process_service_attr_rsp()
514 p_ccb->list_len = 0; in process_service_attr_rsp()
515 p_ccb->cur_handle++; in process_service_attr_rsp()
520 if (p_ccb->cur_handle < p_ccb->num_handles) in process_service_attr_rsp()
527 sdp_disconnect (p_ccb, SDP_NO_RESOURCES); in process_service_attr_rsp()
536 UINT16_TO_BE_STREAM (p, p_ccb->transaction_id); in process_service_attr_rsp()
537 p_ccb->transaction_id++; in process_service_attr_rsp()
543 UINT32_TO_BE_STREAM (p, p_ccb->handles[p_ccb->cur_handle]); in process_service_attr_rsp()
549 if (p_ccb->p_db->num_attr_filters) in process_service_attr_rsp()
550 p = sdpu_build_attrib_seq (p, p_ccb->p_db->attr_filters, p_ccb->p_db->num_attr_filters); in process_service_attr_rsp()
571 L2CA_DataWrite (p_ccb->connection_id, p_msg); in process_service_attr_rsp()
574 btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_SDP, SDP_INACT_TIMEOUT); in process_service_attr_rsp()
578 sdp_disconnect (p_ccb, SDP_SUCCESS); in process_service_attr_rsp()
594 static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply, UINT16 len) in process_service_search_attr_rsp() argument
621 if ((p_ccb->list_len + lists_byte_count) > SDP_MAX_LIST_BYTE_COUNT) in process_service_search_attr_rsp()
623 sdp_disconnect (p_ccb, SDP_INVALID_PDU_SIZE); in process_service_search_attr_rsp()
629 p_ccb->list_len, lists_byte_count); in process_service_search_attr_rsp()
631 if (p_ccb->rsp_list == NULL) in process_service_search_attr_rsp()
633 p_ccb->rsp_list = (UINT8 *)GKI_getbuf (SDP_MAX_LIST_BYTE_COUNT); in process_service_search_attr_rsp()
634 if (p_ccb->rsp_list == NULL) in process_service_search_attr_rsp()
637 sdp_disconnect (p_ccb, SDP_NO_RESOURCES); in process_service_search_attr_rsp()
641 memcpy (&p_ccb->rsp_list[p_ccb->list_len], p_reply, lists_byte_count); in process_service_search_attr_rsp()
642 p_ccb->list_len += lists_byte_count; in process_service_search_attr_rsp()
645 SDP_TRACE_WARNING1("list_len: %d(search_attr_rsp)", p_ccb->list_len); in process_service_search_attr_rsp()
654 sdp_disconnect (p_ccb, SDP_INVALID_CONT_STATE); in process_service_search_attr_rsp()
673 sdp_disconnect (p_ccb, SDP_NO_RESOURCES); in process_service_search_attr_rsp()
682 UINT16_TO_BE_STREAM (p, p_ccb->transaction_id); in process_service_search_attr_rsp()
683 p_ccb->transaction_id++; in process_service_search_attr_rsp()
691 p = sdpu_build_uuid_seq (p, 1, &p_ccb->p_db->uuid_filters[p_ccb->cur_uuid_idx]); in process_service_search_attr_rsp()
693 p = sdpu_build_uuid_seq (p, p_ccb->p_db->num_uuid_filters, p_ccb->p_db->uuid_filters); in process_service_search_attr_rsp()
700 if (p_ccb->p_db->num_attr_filters) in process_service_search_attr_rsp()
701 p = sdpu_build_attrib_seq (p, p_ccb->p_db->attr_filters, p_ccb->p_db->num_attr_filters); in process_service_search_attr_rsp()
722 L2CA_DataWrite (p_ccb->connection_id, p_msg); in process_service_search_attr_rsp()
725 btu_start_timer (&p_ccb->timer_entry, BTU_TTYPE_SDP, SDP_INACT_TIMEOUT); in process_service_search_attr_rsp()
737 sdp_copy_raw_data (p_ccb, len, TRUE); in process_service_search_attr_rsp()
740 p = &p_ccb->rsp_list[0]; in process_service_search_attr_rsp()
752 p_end = &p_ccb->rsp_list[p_ccb->list_len]; in process_service_search_attr_rsp()
756 sdp_disconnect (p_ccb, SDP_INVALID_CONT_STATE); in process_service_search_attr_rsp()
762 p = save_attr_seq (p_ccb, p, &p_ccb->rsp_list[p_ccb->list_len]); in process_service_search_attr_rsp()
765 sdp_disconnect (p_ccb, SDP_DB_FULL); in process_service_search_attr_rsp()
771 sdp_disconnect (p_ccb, SDP_SUCCESS); in process_service_search_attr_rsp()
784 static UINT8 *save_attr_seq (tCONN_CB *p_ccb, UINT8 *p, UINT8 *p_msg_end) in save_attr_seq() argument
807 p_rec = add_record (p_ccb->p_db, p_ccb->device_address); in save_attr_seq()
829 p = add_attr (p, p_ccb->p_db, p_rec, attr_id, NULL, 0); in save_attr_seq()