From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> --- src/shared/hci.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/shared/hci.c b/src/shared/hci.c index 6ce62eb..9ab8c6e 100644 --- a/src/shared/hci.c +++ b/src/shared/hci.c @@ -113,7 +113,7 @@ static void send_command(struct bt_hci *hci, uint16_t opcode, uint8_t type = BT_H4_CMD_PKT; struct bt_hci_cmd_hdr hdr; struct iovec iov[3]; - int fd, iovcnt; + int iovcnt; if (hci->num_cmds < 1) return; @@ -133,11 +133,7 @@ static void send_command(struct bt_hci *hci, uint16_t opcode, } else iovcnt = 2; - fd = io_get_fd(hci->io); - if (fd < 0) - return; - - if (writev(fd, iov, iovcnt) < 0) + if (io_send(hci->io, iov, iovcnt) < 0) return; hci->num_cmds--; -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html