- if (consumer->type == CONSUMER_DST_LOCAL) {
- /* Set application path to the destination path */
- ret = snprintf(tmp_path, sizeof(tmp_path), "%s%s%s",
- consumer->dst.session_root_path,
- consumer->chunk_path,
- consumer->domain_subdir);
- if (ret < 0) {
- PERROR("snprintf kernel channel path");
- goto error;
- } else if (ret >= sizeof(tmp_path)) {
- ERR("Kernel channel path exceeds the maximal allowed length of of %zu bytes (%i bytes required) with path \"%s%s%s\"",
- sizeof(tmp_path), ret,
- consumer->dst.session_root_path,
- consumer->chunk_path,
- consumer->domain_subdir);
- goto error;
- }
- pathname = lttng_strndup(tmp_path, sizeof(tmp_path));
+ if (consumer->type == CONSUMER_DST_LOCAL ||
+ (consumer->type == CONSUMER_DST_NET &&
+ consumer->relay_major_version == 2 &&
+ consumer->relay_minor_version >= 11)) {
+ pathname = strdup(consumer->domain_subdir);