2 * Copyright (C) 2013 - Julien Desfossez <jdesfossez@efficios.com>
3 * David Goulet <dgoulet@efficios.com>
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License, version 2 only, as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 51
16 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #include <common/common.h>
24 #include <common/sessiond-comm/relayd.h>
26 #include "cmd-generic.h"
30 int cmd_recv_stream_2_1(struct relay_command
*cmd
, struct relay_stream
*stream
)
33 struct lttcomm_relayd_add_stream stream_info
;
38 ret
= cmd_recv(cmd
->sock
, &stream_info
, sizeof(stream_info
));
40 ERR("Unable to recv stream version 2.1");
44 stream
->path_name
= create_output_path(stream_info
.pathname
);
45 if (stream
->path_name
== NULL
) {
46 PERROR("Path name allocation");
51 stream
->channel_name
= strdup(stream_info
.channel_name
);
52 if (stream
->channel_name
== NULL
) {
54 PERROR("Path name allocation");