X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fbackward-compatibility-group-by.cpp;h=c56742720066b74c86d8277d3e3eb973bfce6295;hb=28ab034a2c3582d07d3423d2d746731f87d3969f;hp=78f8a1971a190814919007e98f59ab33b6bb8ba9;hpb=52e345b9ac912d033c2a2c25a170a01cf209839d;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/backward-compatibility-group-by.cpp b/src/bin/lttng-relayd/backward-compatibility-group-by.cpp index 78f8a1971..c56742720 100644 --- a/src/bin/lttng-relayd/backward-compatibility-group-by.cpp +++ b/src/bin/lttng-relayd/backward-compatibility-group-by.cpp @@ -5,20 +5,19 @@ * */ +#include "backward-compatibility-group-by.hpp" #include "common/time.hpp" -#include -#include -#include -#include #include #include #include -#include "backward-compatibility-group-by.hpp" +#include +#include +#include +#include -#define DATETIME_REGEX \ - ".*-[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]$" +#define DATETIME_REGEX ".*-[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. @@ -28,8 +27,8 @@ * Return the allocated string containing the new stream path or else NULL. */ char *backward_compat_group_by_session(const char *path, - const char *local_session_name, - time_t relay_session_creation_time) + const char *local_session_name, + time_t relay_session_creation_time) { int ret; size_t len; @@ -48,7 +47,8 @@ char *backward_compat_group_by_session(const char *path, LTTNG_ASSERT(local_session_name[0] != '\0'); DBG("Parsing path \"%s\" of session \"%s\" to create a new path that is grouped by session", - path, local_session_name); + path, + local_session_name); /* Get a local copy for strtok */ local_copy = strdup(path); @@ -74,15 +74,13 @@ char *backward_compat_group_by_session(const char *path, */ hostname_ptr = strtok_r(local_copy, "/", &leftover_ptr); if (!hostname_ptr) { - ERR("Failed to parse session path \"%s\": couldn't identify hostname", - path); + ERR("Failed to parse session path \"%s\": couldn't identify hostname", path); goto error; } second_token_ptr = strtok_r(NULL, "/", &leftover_ptr); if (!second_token_ptr) { - ERR("Failed to parse session path \"%s\": couldn't identify session name", - path); + ERR("Failed to parse session path \"%s\": couldn't identify session name", path); goto error; } @@ -100,8 +98,7 @@ char *backward_compat_group_by_session(const char *path, * --