From 9287efd2beb82eb40e55c86522a9bdfa54e55053 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Wed, 13 Aug 2014 14:32:07 +0300 Subject: [PATCH] monitor: Handle default switch case Fixes issues with junk packets. --- monitor/analyze.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/monitor/analyze.c b/monitor/analyze.c index b027b3c88..eea3c9ee9 100644 --- a/monitor/analyze.c +++ b/monitor/analyze.c @@ -309,6 +309,9 @@ void analyze_trace(const char *path) case BTSNOOP_OPCODE_SCO_RX_PKT: sco_pkt(&tv, index, buf, pktlen); break; + default: + fprintf(stderr, "Wrong opcode %u\n", opcode); + goto done; } num_packets++; -- 2.47.3