mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-24 22:43:35 +00:00
deamon: remove l2cap_block_credits functionality
This commit is contained in:
parent
3aff022f9b
commit
04c626e393
@ -1112,9 +1112,6 @@ static int daemon_client_handler(connection_t *connection, uint16_t packet_type,
|
||||
case L2CAP_DATA_PACKET:
|
||||
// process l2cap packet...
|
||||
err = l2cap_send_internal(channel, data, length);
|
||||
if (err == BTSTACK_ACL_BUFFERS_FULL) {
|
||||
l2cap_block_new_credits(1);
|
||||
}
|
||||
break;
|
||||
case RFCOMM_DATA_PACKET:
|
||||
// process l2cap packet...
|
||||
@ -1235,10 +1232,6 @@ static void daemon_retry_parked(void){
|
||||
// ... try sending again
|
||||
socket_connection_retry_parked();
|
||||
|
||||
if (!socket_connection_has_parked_connections()){
|
||||
l2cap_block_new_credits(0);
|
||||
}
|
||||
|
||||
// unlock mutex
|
||||
retry_mutex = 0;
|
||||
}
|
||||
|
@ -78,7 +78,6 @@ static linked_list_t l2cap_services;
|
||||
static linked_list_t l2cap_le_channels;
|
||||
static linked_list_t l2cap_le_services;
|
||||
static void (*packet_handler) (void * connection, uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size) = null_packet_handler;
|
||||
static int new_credits_blocked = 0;
|
||||
|
||||
static btstack_packet_handler_t attribute_protocol_packet_handler;
|
||||
static btstack_packet_handler_t security_protocol_packet_handler;
|
||||
@ -95,7 +94,6 @@ static int l2cap_channel_ready_for_open(l2cap_channel_t *channel);
|
||||
|
||||
|
||||
void l2cap_init(void){
|
||||
new_credits_blocked = 0;
|
||||
signaling_responses_pending = 0;
|
||||
|
||||
l2cap_channels = NULL;
|
||||
@ -213,14 +211,7 @@ static void l2cap_emit_credits(l2cap_channel_t *channel, uint8_t credits) {
|
||||
l2cap_dispatch(channel, HCI_EVENT_PACKET, event, sizeof(event));
|
||||
}
|
||||
|
||||
void l2cap_block_new_credits(uint8_t blocked){
|
||||
new_credits_blocked = blocked;
|
||||
}
|
||||
|
||||
static void l2cap_hand_out_credits(void){
|
||||
|
||||
if (new_credits_blocked) return; // we're told not to. used by daemon
|
||||
|
||||
linked_list_iterator_t it;
|
||||
linked_list_iterator_init(&it, &l2cap_channels);
|
||||
while (linked_list_iterator_has_next(&it)){
|
||||
|
@ -201,8 +201,6 @@ typedef struct l2cap_signaling_response {
|
||||
} l2cap_signaling_response_t;
|
||||
|
||||
|
||||
void l2cap_block_new_credits(uint8_t blocked);
|
||||
|
||||
int l2cap_can_send_fixed_channel_packet_now(uint16_t handle);
|
||||
|
||||
// @deprecated use l2cap_can_send_fixed_channel_packet_now instead
|
||||
|
Loading…
x
Reference in New Issue
Block a user