From c7d2bd837f7386151c5bc3109a5213d00a5e5c60 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 26 Sep 2014 17:45:32 +0300 Subject: [PATCH] shared/hci: Make use of io_send --- 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 6ce62eba4..9ab8c6ef0 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--; -- 2.47.3