rename l2cap_can_send_packet_now_using_buffer to l2cap_can_send_packet_now

This commit is contained in:
matthias.ringwald@gmail.com 2014-04-03 15:31:14 +00:00
parent 64f0b431f7
commit 85889d6cd5
4 changed files with 2 additions and 11 deletions

View File

@ -229,13 +229,6 @@ l2cap_channel_t * l2cap_get_channel_for_local_cid(uint16_t local_cid){
}
int l2cap_can_send_packet_now(uint16_t local_cid){
l2cap_channel_t *channel = l2cap_get_channel_for_local_cid(local_cid);
if (!channel) return 0;
if (!channel->packets_granted) return 0;
return hci_can_send_packet_now(HCI_ACL_DATA_PACKET);
}
int l2cap_can_send_packet_now_using_buffer(uint16_t local_cid){
l2cap_channel_t *channel = l2cap_get_channel_for_local_cid(local_cid);
if (!channel) return 0;
if (!channel->packets_granted) return 0;

View File

@ -199,8 +199,6 @@ void l2cap_block_new_credits(uint8_t blocked);
int l2cap_can_send_packet_now(uint16_t local_cid); // non-blocking UART write
int l2cap_can_send_packet_now_using_buffer(uint16_t local_cid);
int l2cap_reserve_packet_buffer(void);
// get outgoing buffer and prepare data

View File

@ -491,7 +491,7 @@ static rfcomm_service_t * rfcomm_service_for_channel(uint8_t server_channel){
*/
static int rfcomm_send_packet_for_multiplexer(rfcomm_multiplexer_t *multiplexer, uint8_t address, uint8_t control, uint8_t credits, uint8_t *data, uint16_t len){
if (!l2cap_can_send_packet_now_using_buffer(multiplexer->l2cap_cid)) return BTSTACK_ACL_BUFFERS_FULL;
if (!l2cap_can_send_packet_now(multiplexer->l2cap_cid)) return BTSTACK_ACL_BUFFERS_FULL;
l2cap_reserve_packet_buffer();
uint8_t * rfcomm_out_buffer = l2cap_get_outgoing_buffer();

View File

@ -109,7 +109,7 @@ void sdp_client_query(bd_addr_t remote, uint8_t * des_serviceSearchPattern, uint
static void try_to_send(uint16_t channel){
if (sdp_client_state != W2_SEND) return;
if (!l2cap_can_send_packet_now_using_buffer(channel)) return;
if (!l2cap_can_send_packet_now(channel)) return;
l2cap_reserve_packet_buffer();
uint8_t * data = l2cap_get_outgoing_buffer();