Skip to content

Commit

Permalink
Fix wrong timeout (it should be in ms when passed to fdread_ex)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfto committed Sep 28, 2020
1 parent fda00b4 commit 46b46e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion videohubctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ static int read_device_command_stream(struct videohub_data *d) {
if (test_data)
return 0;
memset(buf, 0, sizeof(buf));
while ((ret = fdread_ex(d->dev_fd, buf, sizeof(buf) - 1, timeout, 0, 1)) >= 0) {
while ((ret = fdread_ex(d->dev_fd, buf, sizeof(buf) - 1, timeout * 1000, 0, 1)) >= 0) {
ncommands += parse_text_buffer(d, buf);
memset(buf, 0, sizeof(buf));
}
Expand Down

0 comments on commit 46b46e9

Please sign in to comment.