X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fconsumer.c;h=79fdbf1c8b632bc9f049e27511f7b593314bd0f7;hb=1bfe73287bb3776cdba5a76d5a812ef79820bf10;hp=66fecd617612bb44fe6c7d066a32a7a75e65f5b3;hpb=03b4fdcf623dd767bb03bc6d62fa813d360b4269;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/consumer.c b/src/bin/lttng-sessiond/consumer.c index 66fecd617..79fdbf1c8 100644 --- a/src/bin/lttng-sessiond/consumer.c +++ b/src/bin/lttng-sessiond/consumer.c @@ -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;