channel->session_id,
msg.u.stream.cpu,
&alloc_ret,
- channel->type);
+ channel->type,
+ channel->monitor);
if (new_stream == NULL) {
switch (alloc_ret) {
case -ENOMEM:
break;
}
- ret = consumer_send_relayd_stream(new_stream, NULL);
- if (ret < 0) {
- consumer_stream_free(new_stream);
- goto end_nosignal;
+ /* Send stream to relayd if the stream has an ID. */
+ if (new_stream->net_seq_idx != (uint64_t) -1ULL) {
+ ret = consumer_send_relayd_stream(new_stream,
+ new_stream->chan->pathname);
+ if (ret < 0) {
+ consumer_stream_free(new_stream);
+ goto end_nosignal;
+ }
}
/* Get the right pipe where the stream will be sent. */