summaryrefslogtreecommitdiff
path: root/cethcan/can.c
diff options
context:
space:
mode:
Diffstat (limited to 'cethcan/can.c')
-rw-r--r--cethcan/can.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cethcan/can.c b/cethcan/can.c
index 5145871..39da3f1 100644
--- a/cethcan/can.c
+++ b/cethcan/can.c
@@ -40,10 +40,12 @@ void can_broadcast(struct can_user *origin, struct can_message *msg)
lprintf("invalid CAN message (DLC = %zu)", msg->dlc);
return;
}
- for (size_t i = 0; i < msg->dlc; i++)
- sprintf(buf + 3 * i, " %02x", msg->bytes[i]);
- lprintf("%s: %08x (%zu)%s", origin->name,
- (unsigned)msg->daddr, msg->dlc, buf);
+ if (verbosity >= 1) {
+ for (size_t i = 0; i < msg->dlc; i++)
+ sprintf(buf + 3 * i, " %02x", msg->bytes[i]);
+ lprintf("%s: %08x (%zu)%s", origin->name,
+ (unsigned)msg->daddr, msg->dlc, buf);
+ }
for (u = users; u; u = u->next)
if (u != origin)