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

Commit e243a888 authored by Chris Manton's avatar Chris Manton Committed by Android Git Automerger
Browse files

am b2c07391: Check userial fd before reading

* commit 'b2c07391':
  Check userial fd before reading
parents 0ee9f004 b2c07391
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -219,7 +219,11 @@ static void *userial_read_thread(void *arg)
            p_buf->layer_specific = 0;

            p = (uint8_t *) (p_buf + 1);
            rx_length = select_read(userial_cb.fd, p, HCI_MAX_FRAME_SIZE + 1);
            int userial_fd = userial_cb.fd;
            if (userial_fd != -1)
                rx_length = select_read(userial_fd, p, HCI_MAX_FRAME_SIZE + 1);
            else
                rx_length = 0;
        }
        else
        {