send DAEMON_EVENT_HCI_PACKET_SENT as valid HCI Event - fixes issue #360

This commit is contained in:
matthias.ringwald@gmail.com 2013-12-20 19:22:19 +00:00
parent 9012c5085a
commit b36cf1a947
3 changed files with 6 additions and 6 deletions

View File

@ -254,8 +254,8 @@ static int h4_process(struct data_source *ds) {
if (tx_state == TX_DONE){
// reset state
tx_state = TX_IDLE;
uint8_t event = DAEMON_EVENT_HCI_PACKET_SENT;
packet_handler(HCI_EVENT_PACKET, &event, 1);
uint8_t event[] = { DAEMON_EVENT_HCI_PACKET_SENT, 0 };
packet_handler(HCI_EVENT_PACKET, &event[0], sizeof(event));
}
if (h4_state != H4_PACKET_RECEIVED) return 0;

View File

@ -341,8 +341,8 @@ static int h4_process(struct data_source *ds) {
if (tx_state == TX_DONE){
// reset state
tx_state = TX_IDLE;
uint8_t event = DAEMON_EVENT_HCI_PACKET_SENT;
packet_handler(HCI_EVENT_PACKET, &event, 1);
uint8_t event[] = { DAEMON_EVENT_HCI_PACKET_SENT, 0 };
packet_handler(HCI_EVENT_PACKET, &event[0], sizeof(event));
}
if (h4_state != H4_PACKET_RECEIVED) return 0;

View File

@ -286,7 +286,7 @@ static void handle_completed_transfer(struct libusb_transfer *transfer){
// notify upper stack that iit might be possible to send again
uint8_t event[] = { DAEMON_EVENT_HCI_PACKET_SENT, 0};
packet_handler(HCI_EVENT_PACKET, (uint8_t*) &event, 2);
packet_handler(HCI_EVENT_PACKET, &event[0], sizeof(event));
resubmit = 0;
} else if (transfer->endpoint == 0){
@ -295,7 +295,7 @@ static void handle_completed_transfer(struct libusb_transfer *transfer){
// notify upper stack that iit might be possible to send again
uint8_t event[] = { DAEMON_EVENT_HCI_PACKET_SENT, 0};
packet_handler(HCI_EVENT_PACKET, (uint8_t*) &event, 2);
packet_handler(HCI_EVENT_PACKET, &event[0], sizeof(event));
resubmit = 0;
} else {