X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fconsumer.c;h=6351ebe32f47431c0f6490bd6edd23ba3b8a0c37;hp=dc21e24ca0a5c01e4c2e8d3b24082492685944bf;hb=2b29c638278807c1536634ce49f0c9c053b3ab5f;hpb=366a9222abc182bf77de1b806256aa9a9dc8832a diff --git a/src/bin/lttng-sessiond/consumer.c b/src/bin/lttng-sessiond/consumer.c index dc21e24ca..6351ebe32 100644 --- a/src/bin/lttng-sessiond/consumer.c +++ b/src/bin/lttng-sessiond/consumer.c @@ -715,11 +715,12 @@ int consumer_set_network_uri(struct consumer_output *obj, goto error; } - if (lttng_strncpy(obj->subdir, tmp_path, sizeof(obj->subdir))) { + if (lttng_strncpy(obj->dst.net.base_dir, tmp_path, + sizeof(obj->dst.net.base_dir))) { ret = -LTTNG_ERR_INVALID; goto error; } - DBG3("Consumer set network uri subdir path %s", tmp_path); + DBG3("Consumer set network uri base_dir path %s", tmp_path); } return 0; @@ -1417,8 +1418,11 @@ int consumer_snapshot_channel(struct consumer_socket *socket, uint64_t key, msg.u.snapshot_channel.use_relayd = 1; ret = snprintf(msg.u.snapshot_channel.pathname, sizeof(msg.u.snapshot_channel.pathname), - "%s/%s-%s-%" PRIu64 "%s", output->consumer->subdir, - output->name, output->datetime, output->nb_snapshot, + "%s/%s/%s-%s-%" PRIu64 "%s", + output->consumer->dst.net.base_dir, + output->consumer->subdir, + output->name, output->datetime, + output->nb_snapshot, session_path); if (ret < 0) { ret = -LTTNG_ERR_NOMEM; @@ -1427,8 +1431,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-%" PRIu64 "%s", output->consumer->dst.session_root_path, - output->name, output->datetime, output->nb_snapshot, + "%s/%s-%s-%" PRIu64 "%s", + output->consumer->dst.session_root_path, + output->name, output->datetime, + output->nb_snapshot, session_path); if (ret < 0) { ret = -LTTNG_ERR_NOMEM;