Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0dc388a2 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by Andre Eisenbach
Browse files

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

Also, print a better error message.

Change-Id: I22da05fd5e9b10a5122705105ea7a45855eb144d
parent bd4bae49
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -204,10 +204,10 @@ static int bt_vendor_wait_hcidev(void)
    }

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