aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2016-10-21 10:38:29 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2016-10-21 10:38:29 +0200
commit0bd4b277c452aa7cfd537799538b8e9b951c0d47 (patch)
tree307687bfdd9b6f53aca2470230da9405a4648eaa
parent79186f9d3d9d3b6bee44444a611bd92435d11807 (diff)
cec-compliance: don't test yourself
If the logical address of the remote adapter is the same as that of the local adapter, then skip the remote test since you can't send messages to yourself. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-rw-r--r--utils/cec-compliance/cec-compliance.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/cec-compliance/cec-compliance.cpp b/utils/cec-compliance/cec-compliance.cpp
index ca9b0967..7a524ebd 100644
--- a/utils/cec-compliance/cec-compliance.cpp
+++ b/utils/cec-compliance/cec-compliance.cpp
@@ -1359,7 +1359,8 @@ int main(int argc, char **argv)
if (!(node.adap_la_mask & (1 << from)))
continue;
for (unsigned to = 0; to <= 15; to++)
- if ((remote_la_mask & (1 << to)) &&
+ if (!(node.adap_la_mask & (1 << to)) &&
+ (remote_la_mask & (1 << to)) &&
node.remote[to].phys_addr != CEC_PHYS_ADDR_INVALID)
testRemote(&node, from, to, test_tags, options[OptInteractive]);
}

Privacy Policy