From 3aa94ed3462a262e7f2382dedd416077f76266e9 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Mon, 2 Sep 2013 19:56:51 +0000 Subject: [PATCH] avoid starving by sending DAEMON_EVENT_HCI_PACKET_SENT up the stack --- src/hci_transport_usb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hci_transport_usb.c b/src/hci_transport_usb.c index 54a03deb5..e1177eec4 100644 --- a/src/hci_transport_usb.c +++ b/src/hci_transport_usb.c @@ -267,6 +267,10 @@ static void handle_completed_transfer(struct libusb_transfer *transfer){ // log_info("acl out done, size %u", transfer->actual_length); usb_acl_out_active = 0; + // notify upper stack that iit might be possible to send again + uint8_t event = DAEMON_EVENT_HCI_PACKET_SENT; + packet_handler(HCI_EVENT_PACKET, &event, 1); + resubmit = 0; } else if (transfer->endpoint == 0){ // log_info("command done, size %u", transfer->actual_length);