Add a missing OSI_NO_INTR() wrapper around socket read()
Also, print a better error message.
Change-Id: I22da05fd5e9b10a5122705105ea7a45855eb144d
diff --git a/vendor_libs/linux/bt_vendor_linux.c b/vendor_libs/linux/bt_vendor_linux.c
index 3308765..74d9bfa 100644
--- a/vendor_libs/linux/bt_vendor_linux.c
+++ b/vendor_libs/linux/bt_vendor_linux.c
@@ -204,10 +204,10 @@
}
if (fds[0].revents & POLLIN) {
- n = read(fd, &ev, sizeof(struct mgmt_pkt));
+ OSI_NO_INTR(n = read(fd, &ev, sizeof(struct mgmt_pkt)));
if (n < 0) {
- LOG_ERROR(LOG_TAG,
- "Error reading control channel");
+ LOG_ERROR(LOG_TAG, "Error reading control channel: %s",
+ strerror(errno));
ret = -1;
break;
}