• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

修订版de394d7a4cd3dd68edfbf6eb6c2eb89c0cbbed29 (tree)
时间2016-10-07 00:20:31
作者Pavlin Radoslavov <pavlin@goog...>
CommiterChih-Wei Huang

Log Message

Add a missing OSI_NO_INTR() wrapper around socket read()

Also, print a better error message.

Change-Id: I22da05fd5e9b10a5122705105ea7a45855eb144d

更改概述

差异

--- a/vendor_libs/linux/bt_vendor_linux.c
+++ b/vendor_libs/linux/bt_vendor_linux.c
@@ -203,10 +203,10 @@ static int bt_vendor_wait_hcidev(void)
203203 }
204204
205205 if (fds[0].revents & POLLIN) {
206- n = read(fd, &ev, sizeof(struct mgmt_pkt));
206+ OSI_NO_INTR(n = read(fd, &ev, sizeof(struct mgmt_pkt)));
207207 if (n < 0) {
208- LOG_ERROR(LOG_TAG,
209- "Error reading control channel");
208+ LOG_ERROR(LOG_TAG, "Error reading control channel: %s",
209+ strerror(errno));
210210 ret = -1;
211211 break;
212212 }