Lines Matching refs:id

83   uint32_t id;  // Non-zero indicates a valid (in-use) slot.  member
116 static void jv_dm_cback(tBTA_JV_EVT event, tBTA_JV* p_data, uint32_t id);
150 if (rfc_slots[i].id) cleanup_rfc_slot(&rfc_slots[i]); in btsock_rfc_cleanup()
162 static rfc_slot_t* find_rfc_slot_by_id(uint32_t id) { in find_rfc_slot_by_id() argument
163 CHECK(id != 0); in find_rfc_slot_by_id()
166 if (rfc_slots[i].id == id) return &rfc_slots[i]; in find_rfc_slot_by_id()
168 LOG_ERROR("%s unable to find RFCOMM slot id: %u", __func__, id); in find_rfc_slot_by_id()
176 if (rfc_slots[i].id && rfc_slots[i].f.pending_sdp_request && in find_rfc_slot_by_pending_sdp()
177 rfc_slots[i].id < min_id) { in find_rfc_slot_by_pending_sdp()
178 min_id = rfc_slots[i].id; in find_rfc_slot_by_pending_sdp()
187 if (rfc_slots[i].id && rfc_slots[i].f.doing_sdp_request) return true; in is_requesting_sdp()
238 slot->id = rfc_slot_id; in alloc_rfc_slot()
271 uint32_t new_listen_id = accept_rs->id; in create_srv_accept_rfc_slot()
272 accept_rs->id = srv_rs->id; in create_srv_accept_rfc_slot()
273 srv_rs->id = new_listen_id; in create_srv_accept_rfc_slot()
321 BTA_JvGetChannelId(BTA_JV_CONN_TYPE_RFCOMM, slot->id, channel); in btsock_rfc_listen()
334 slot->id); in btsock_rfc_listen()
365 rfcomm_cback, slot->id); in btsock_rfc_connect()
379 BTA_JvStartDiscovery(*bd_addr, 1, service_uuid, slot->id); in btsock_rfc_connect()
392 slot->id); in btsock_rfc_connect()
410 BTA_JvRfcommStopServer(slot->rfc_handle, slot->id); in free_rfc_slot_scn()
423 slot->addr, slot->id, BTSOCK_RFCOMM, in cleanup_rfc_slot()
442 BTA_JvRfcommClose(slot->rfc_handle, slot->id); in cleanup_rfc_slot()
451 slot->id = 0; in cleanup_rfc_slot()
483 static void on_cl_rfc_init(tBTA_JV_RFCOMM_CL_INIT* p_init, uint32_t id) { in on_cl_rfc_init() argument
485 rfc_slot_t* slot = find_rfc_slot_by_id(id); in on_cl_rfc_init()
496 uint32_t id) { in on_srv_rfc_listen_started() argument
498 rfc_slot_t* slot = find_rfc_slot_by_id(id); in on_srv_rfc_listen_started()
504 slot->addr, slot->id, BTSOCK_RFCOMM, in on_srv_rfc_listen_started()
516 uint32_t id) { in on_srv_rfc_connect() argument
519 rfc_slot_t* srv_rs = find_rfc_slot_by_id(id); in on_srv_rfc_connect()
527 accept_rs->addr, accept_rs->id, BTSOCK_RFCOMM, in on_srv_rfc_connect()
535 srv_rs->id); in on_srv_rfc_connect()
537 accept_rs->id); in on_srv_rfc_connect()
542 return srv_rs->id; in on_srv_rfc_connect()
545 static void on_cli_rfc_connect(tBTA_JV_RFCOMM_OPEN* p_open, uint32_t id) { in on_cli_rfc_connect() argument
547 rfc_slot_t* slot = find_rfc_slot_by_id(id); in on_cli_rfc_connect()
559 slot->addr, slot->id, BTSOCK_RFCOMM, in on_cli_rfc_connect()
574 uint32_t id) { in on_rfc_close() argument
578 rfc_slot_t* slot = find_rfc_slot_by_id(id); in on_rfc_close()
581 slot->addr, slot->id, BTSOCK_RFCOMM, in on_rfc_close()
590 static void on_rfc_write_done(tBTA_JV_RFCOMM_WRITE* p, uint32_t id) { in on_rfc_write_done() argument
600 rfc_slot_t* slot = find_rfc_slot_by_id(id); in on_rfc_write_done()
605 slot->id); in on_rfc_write_done()
613 static void on_rfc_outgoing_congest(tBTA_JV_RFCOMM_CONG* p, uint32_t id) { in on_rfc_outgoing_congest() argument
616 rfc_slot_t* slot = find_rfc_slot_by_id(id); in on_rfc_outgoing_congest()
621 slot->id); in on_rfc_outgoing_congest()
627 uint32_t id = 0; in rfcomm_cback() local
647 id = on_srv_rfc_connect(&p_data->rfc_srv_open, rfcomm_slot_id); in rfcomm_cback()
673 return id; in rfcomm_cback()
676 static void jv_dm_cback(tBTA_JV_EVT event, tBTA_JV* p_data, uint32_t id) { in jv_dm_cback() argument
680 rfc_slot_t* rs = find_rfc_slot_by_id(id); in jv_dm_cback()
699 APPL_TRACE_DEBUG("send_app_scn() failed, close rs->id:%d", rs->id); in jv_dm_cback()
705 BTA_JvCreateRecordByUser(rs->id); in jv_dm_cback()
710 rs->id); in jv_dm_cback()
713 MAX_RFC_SESSION, rfcomm_cback, rs->id); in jv_dm_cback()
726 on_l2cap_psm_assigned(id, p_data->psm); in jv_dm_cback()
731 rfc_slot_t* slot = find_rfc_slot_by_id(id); in jv_dm_cback()
736 MAX_RFC_SESSION, rfcomm_cback, slot->id); in jv_dm_cback()
747 rfc_slot_t* slot = find_rfc_slot_by_id(id); in jv_dm_cback()
754 rfcomm_cback, slot->id) == BTA_JV_SUCCESS) { in jv_dm_cback()
767 __func__, id); in jv_dm_cback()
776 BTA_JvStartDiscovery(slot->addr, 1, &slot->service_uuid, slot->id); in jv_dm_cback()
784 APPL_TRACE_DEBUG("unhandled event:%d, slot id:%d", event, id); in jv_dm_cback()
827 slot->id); in flush_incoming_que_on_wr_signal()
844 slot->rfc_handle, slot->rfc_port_handle, slot->id); in flush_incoming_que_on_wr_signal()
862 BTA_JvRfcommWrite(slot->rfc_handle, slot->id); in btsock_rfc_signaled()
868 __func__, slot->id, slot->scn); in btsock_rfc_signaled()
879 __func__, slot->id, slot->scn); in btsock_rfc_signaled()
892 int bta_co_rfc_data_incoming(uint32_t id, BT_HDR* p_buf) { in bta_co_rfc_data_incoming() argument
897 rfc_slot_t* slot = find_rfc_slot_by_id(id); in bta_co_rfc_data_incoming()
909 slot->id); in bta_co_rfc_data_incoming()
932 int bta_co_rfc_data_outgoing_size(uint32_t id, int* size) { in bta_co_rfc_data_outgoing_size() argument
935 rfc_slot_t* slot = find_rfc_slot_by_id(id); in bta_co_rfc_data_outgoing_size()
948 int bta_co_rfc_data_outgoing(uint32_t id, uint8_t* buf, uint16_t size) { in bta_co_rfc_data_outgoing() argument
950 rfc_slot_t* slot = find_rfc_slot_by_id(id); in bta_co_rfc_data_outgoing()