Add the number of snapshot taken to the output path
[lttng-tools.git] / src / bin / lttng-sessiond / consumer.c
index 66fecd617612bb44fe6c7d066a32a7a75e65f5b3..79fdbf1c8b632bc9f049e27511f7b593314bd0f7 100644 (file)
@@ -1232,8 +1232,9 @@ int consumer_snapshot_channel(struct consumer_socket *socket, uint64_t key,
                msg.u.snapshot_channel.relayd_id = output->consumer->net_seq_index;
                msg.u.snapshot_channel.use_relayd = 1;
                ret = snprintf(msg.u.snapshot_channel.pathname,
-                               sizeof(msg.u.snapshot_channel.pathname), "%s/%s-%s%s",
-                               output->consumer->subdir, output->name, output->datetime,
+                               sizeof(msg.u.snapshot_channel.pathname),
+                               "%s/%s-%s-%" PRIu64 "%s", output->consumer->subdir,
+                               output->name, output->datetime, output->nb_snapshot,
                                session_path);
                if (ret < 0) {
                        ret = -LTTNG_ERR_NOMEM;
@@ -1241,9 +1242,10 @@ int consumer_snapshot_channel(struct consumer_socket *socket, uint64_t key,
                }
        } else {
                ret = snprintf(msg.u.snapshot_channel.pathname,
-                               sizeof(msg.u.snapshot_channel.pathname), "%s/%s-%s%s",
-                               output->consumer->dst.trace_path, output->name,
-                               output->datetime, session_path);
+                               sizeof(msg.u.snapshot_channel.pathname),
+                               "%s/%s-%s-%" PRIu64 "%s", output->consumer->dst.trace_path,
+                               output->name, output->datetime, output->nb_snapshot,
+                               session_path);
                if (ret < 0) {
                        ret = -LTTNG_ERR_NOMEM;
                        goto error;
This page took 0.027087 seconds and 4 git commands to generate.