[PATCH] cec-ctl: print correct destination address for broadcast msgs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When messages are broadcast, it is not necessary to supply a --to option
to cec-ctl, but in that case the destination address was printed wrongly.

Signed-off-by: Johan Fjeldtvedt <jaffe1@xxxxxxxxx>
---
 utils/cec-ctl/cec-ctl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/cec-ctl/cec-ctl.cpp b/utils/cec-ctl/cec-ctl.cpp
index 10efcbd..9db6299 100644
--- a/utils/cec-ctl/cec-ctl.cpp
+++ b/utils/cec-ctl/cec-ctl.cpp
@@ -1888,7 +1888,7 @@ int main(int argc, char **argv)
 		}
 		printf("\nTransmit from %s to %s (%d to %d):\n", la2s(from),
 		       (cec_msg_is_broadcast(&msg) || to == 0xf) ? "all" : la2s(to),
-		       from, to);
+		       from, cec_msg_is_broadcast(&msg) ? 0xf : to);
 		msg.msg[0] |= (from << 4) | (cec_msg_is_broadcast(&msg) ? 0xf : to);
 		log_msg(&msg);
 		if (doioctl(&node, CEC_TRANSMIT, &msg))
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux