From: Jérémie Galarneau Date: Mon, 11 Nov 2019 23:53:56 +0000 (-0500) Subject: Fix: overly restrictive datetime regexp rejects valid dates X-Git-Tag: v2.12.0-rc1~245 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=eb60c7af29eaaefeb68516339df2c7f86136ce23;p=lttng-tools.git Fix: overly restrictive datetime regexp rejects valid dates 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 --- diff --git a/src/bin/lttng-relayd/backward-compatibility-group-by.c b/src/bin/lttng-relayd/backward-compatibility-group-by.c index 0127f63f5..dd5ccffd5 100644 --- a/src/bin/lttng-relayd/backward-compatibility-group-by.c +++ b/src/bin/lttng-relayd/backward-compatibility-group-by.c @@ -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.