]> rtime.felk.cvut.cz Git - can-utils.git/commitdiff
cangen: reset frame flags at the start of iteration (#16)
authorRamesh Shanmugasundaram <rshanmu@users.noreply.github.com>
Thu, 30 Jun 2016 19:33:16 +0000 (20:33 +0100)
committerOliver Hartkopp <socketcan@hartkopp.net>
Thu, 30 Jun 2016 19:33:16 +0000 (21:33 +0200)
This patch fixes a bug in cangen.c

Bug: When used with -m option, if a CAN FD frame with BRS option set is
sent, that flag never gets cleared for the subsequent frames.

Fix: Reset frame.flags at the start of iteration.

Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
cangen.c

index cd2228e1949c7f63fde814142a86c25e11b737c3..d0862675bd5446dde9533b15c5371ae997c38fb1 100644 (file)
--- a/cangen.c
+++ b/cangen.c
@@ -357,6 +357,7 @@ int main(int argc, char **argv)
        }
 
        while (running) {
+               frame.flags = 0;
 
                if (count && (--count == 0))
                        running = 0;