From c3b820cfe6b9ae782c7b3f5f29ba0c6fb31620e2 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Fri, 30 Jul 2010 20:21:19 +0000 Subject: [PATCH] only grant credits on open connections --- src/l2cap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/l2cap.c b/src/l2cap.c index a714f6c45..3fcdd3b40 100644 --- a/src/l2cap.c +++ b/src/l2cap.c @@ -152,6 +152,7 @@ void l2cap_hand_out_credits(){ linked_item_t *it; for (it = (linked_item_t *) l2cap_channels; it ; it = it->next){ if (!hci_number_free_acl_slots()) return; + if (channel->state != L2CAP_STATE_OPEN) continue; l2cap_channel_t * channel = (l2cap_channel_t *) it; if (hci_number_outgoing_packets(channel->handle) < 2 && channel->packets_granted == 0) { l2cap_emit_credits(channel, 1);