Diff between 1d2f2732a50cd667039794f2d7a87cd4d3f18a17 and c7d2bd837f7386151c5bc3109a5213d00a5e5c60

Changed Files

File Additions Deletions Status
src/shared/hci.c +2 -6 modified

Full Patch

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--;