From c733a3cd10124c417b12af846c5a6524698c9bae Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Mon, 2 Sep 2013 19:34:21 +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 43d210b24..54c63d7c8 100644 --- a/src/hci_transport_usb.c +++ b/src/hci_transport_usb.c @@ -272,6 +272,10 @@ static void handle_completed_transfer(struct libusb_transfer *transfer){ log_info("command done, size %u", transfer->actual_length); usb_command_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 {