diff --git a/src/shared/hci.c b/src/shared/hci.c
index 1e4b58f..be636de 100644
--- a/src/shared/hci.c
+++ b/src/shared/hci.c
struct bt_hci {
int ref_count;
struct io *io;
+ bool is_stream;
bool writer_active;
uint8_t num_cmds;
unsigned int next_cmd_id;
if (fd < 0)
return false;
+ if (hci->is_stream)
+ return false;
+
len = read(fd, buf, sizeof(buf));
if (len < 0)
return false;
return NULL;
}
+ hci->is_stream = true;
hci->writer_active = false;
hci->num_cmds = 1;
hci->next_cmd_id = 1;
return NULL;
}
+ hci->is_stream = false;
+
bt_hci_set_close_on_unref(hci, true);
return hci;
return NULL;
}
+ hci->is_stream = false;
+
bt_hci_set_close_on_unref(hci, true);
return hci;