Fix: overly restrictive datetime regexp rejects valid dates
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 11 Nov 2019 23:53:56 +0000 (18:53 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 11 Nov 2019 23:57:38 +0000 (18:57 -0500)
The patch introducting backward_compat_group_by_session() was
edited (by me) before being merged and the regular expression was
made stricter. However, one of the changes was erroneous and
restricted the range of the second digit of the 'month' field
to [0-1].

Change it back to [0-9] to accept all months from 1-12.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/backward-compatibility-group-by.c

index 0127f63f5a9277d8ade1187cdd4ed8b615b82098..dd5ccffd532147f8fb317d7f6c23669aa2c11d6a 100644 (file)
@@ -29,7 +29,7 @@
 
 #define DATETIME_STRING_SIZE 16
 #define DATETIME_REGEX \
-       ".*-[1-2][0-9][0-9][0-9][0-1][0-1][0-3][0-9]-[0-2][0-9][0-5][0-9][0-5][0-9]$"
+       ".*-[1-2][0-9][0-9][0-9][0-1][0-9][0-3][0-9]-[0-2][0-9][0-5][0-9][0-5][0-9]$"
 
 /*
  * Provide support for --group-output-by-session for producer >= 2.4 and < 2.11.
This page took 0.028328 seconds and 5 git commands to generate.