aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-10-14 15:12:07 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-10-14 15:12:07 +0200
commit2bae5c1f8ed4c7d9f51c26b41bc4e6b1229ebd47 (patch)
tree63455c5bb86bb02525a4141fe91ec558d823ae0b
parentf87baf65b16328e6bdf8ead57f54ace229caa3c9 (diff)
cec-compliance: fix a bug in util_receive
Don't return -1 at the first timeout of the CEC_RECEIVE ioctl, only after 'timeout' milliseconds passed without receiving a message should this function return -1. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/cec-compliance/cec-compliance.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp
index 6f11e4d5..2a0da209 100644
--- a/utils/cec-compliance/cec-compliance.cpp
+++ b/utils/cec-compliance/cec-compliance.cpp
@@ -898,9 +898,9 @@ int util_receive(struct node *node, unsigned la, unsigned timeout,
while (get_ts_ms() - ts_start < timeout) {
memset(msg, 0, sizeof(*msg));
- msg->timeout = 1;
+ msg->timeout = 20;
if (doioctl(node, CEC_RECEIVE, msg))
- break;
+ continue;
if (cec_msg_initiator(msg) != la)
continue;

Privacy Policy