uchan->obj->shm_fd,
uchan->attr.subbuf_size,
uchan->obj->memory_map_size,
- uchan->name);
+ uchan->name,
+ uchan->streams.count);
ret = consumer_send_channel(sock, &msg);
if (ret < 0) {
consumer->net_seq_index,
0, /* Metadata flag unset */
stream->name,
- pathname);
+ pathname,
+ usess->id);
/* Send stream and file descriptor */
fds[0] = stream->obj->shm_fd;
/* Get the right path name destination */
if (consumer->type == CONSUMER_DST_LOCAL) {
/* Set application path to the destination path */
- ret = snprintf(tmp_path, sizeof(tmp_path), "%s/%s",
- consumer->dst.trace_path, usess->path);
+ ret = snprintf(tmp_path, sizeof(tmp_path), "%s/%s/%s",
+ consumer->dst.trace_path, consumer->subdir, usess->path);
if (ret < 0) {
PERROR("snprintf stream path");
goto error;
usess->metadata->obj->shm_fd,
usess->metadata->attr.subbuf_size,
usess->metadata->obj->memory_map_size,
- "metadata");
+ "metadata",
+ 1);
ret = consumer_send_channel(sock, &msg);
if (ret < 0) {
/* Get correct path name destination */
if (consumer->type == CONSUMER_DST_LOCAL) {
/* Set application path to the destination path */
- ret = snprintf(tmp_path, sizeof(tmp_path), "%s/%s",
- consumer->dst.trace_path, usess->path);
+ ret = snprintf(tmp_path, sizeof(tmp_path), "%s/%s/%s",
+ consumer->dst.trace_path, consumer->subdir, usess->path);
if (ret < 0) {
PERROR("snprintf stream path");
goto error;
consumer->net_seq_index,
1, /* Flag metadata set */
"metadata",
- pathname);
+ pathname,
+ usess->id);
/* Send stream and file descriptor */
fds[0] = usess->metadata->stream_obj->shm_fd;
struct ust_app_channel *ua_chan;
assert(usess);
- assert(consumer);
- assert(sock);
+
+ if (consumer == NULL || sock == NULL) {
+ /* There is no consumer so just ignoring the command. */
+ DBG("UST consumer does not exist. Not sending streams");
+ return 0;
+ }
DBG("Sending metadata stream fd to consumer on %d", sock->fd);