aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <swo-dev@marcschink.de>2016-09-19 17:07:19 +0200
committerMarc Schink <swo-dev@marcschink.de>2016-09-20 20:34:20 +0200
commitc9444c67d42f6a81f3c93555771368a4caac9882 (patch)
tree991af54494ac4d3eed7102f8177c6c49ed2549d0
parent7d7a451d89c7f42bb70f6561b58740a84e4281c1 (diff)
Warn about invalid trailing bit in GTS1 packet
-rw-r--r--libswo/decoder.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libswo/decoder.c b/libswo/decoder.c
index 7a10d39..c866674 100644
--- a/libswo/decoder.c
+++ b/libswo/decoder.c
@@ -307,6 +307,10 @@ static bool decode_gts1_packet(struct libswo_context *ctx)
else
ctx->packet.gts1.wrap = false;
+ if (value & ~(GTS1_WRAP_MASK | GTS1_CLKCH_MASK | GTS1_TS_MASK))
+ log_warn(ctx, "Global timestamp (GTS1) packet "
+ "contains invalid trailing bit.");
+
log_dbg(ctx, "Global timestamp (GTS1) packet decoded.");
return true;
}