projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Store the relay protocol version in the consumer_output
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
main.c
diff --git
a/src/bin/lttng-relayd/main.c
b/src/bin/lttng-relayd/main.c
index 53ffbddf0ac8c71cc1129e3b5e233bdb6564a95f..e4ded2b8655d17c5f270bd67cfffca65697766f8 100644
(file)
--- a/
src/bin/lttng-relayd/main.c
+++ b/
src/bin/lttng-relayd/main.c
@@
-18,7
+18,6
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
#define _LGPL_SOURCE
#include <getopt.h>
#include <grp.h>
#define _LGPL_SOURCE
#include <getopt.h>
#include <grp.h>
@@
-40,7
+39,6
@@
#include <urcu/uatomic.h>
#include <unistd.h>
#include <fcntl.h>
#include <urcu/uatomic.h>
#include <unistd.h>
#include <fcntl.h>
-#include <config.h>
#include <lttng/lttng.h>
#include <common/common.h>
#include <lttng/lttng.h>
#include <common/common.h>
@@
-56,7
+54,7
@@
#include <common/sessiond-comm/relayd.h>
#include <common/uri.h>
#include <common/utils.h>
#include <common/sessiond-comm/relayd.h>
#include <common/uri.h>
#include <common/utils.h>
-#include <common/config/config.h>
+#include <common/config/
session-
config.h>
#include <urcu/rculist.h>
#include "cmd.h"
#include <urcu/rculist.h>
#include "cmd.h"
@@
-307,7
+305,7
@@
end:
/*
* config_entry_handler_cb used to handle options read from a config file.
/*
* config_entry_handler_cb used to handle options read from a config file.
- * See config_entry_handler_cb comment in common/config/config.h for the
+ * See config_entry_handler_cb comment in common/config/
session-
config.h for the
* return value conventions.
*/
static int config_entry_handler(const struct config_entry *entry, void *unused)
* return value conventions.
*/
static int config_entry_handler(const struct config_entry *entry, void *unused)
@@
-1038,7
+1036,8
@@
error_testpoint:
* Set index data from the control port to a given index object.
*/
static int set_index_control_data(struct relay_index *index,
* Set index data from the control port to a given index object.
*/
static int set_index_control_data(struct relay_index *index,
- struct lttcomm_relayd_index *data)
+ struct lttcomm_relayd_index *data,
+ struct relay_connection *conn)
{
struct ctf_packet_index index_data;
{
struct ctf_packet_index index_data;
@@
-1054,6
+1053,12
@@
static int set_index_control_data(struct relay_index *index,
index_data.timestamp_end = data->timestamp_end;
index_data.events_discarded = data->events_discarded;
index_data.stream_id = data->stream_id;
index_data.timestamp_end = data->timestamp_end;
index_data.events_discarded = data->events_discarded;
index_data.stream_id = data->stream_id;
+
+ if (conn->minor >= 8) {
+ index->index_data.stream_instance_id = data->stream_instance_id;
+ index->index_data.packet_seq_num = data->packet_seq_num;
+ }
+
return relay_index_set_data(index, &index_data);
}
return relay_index_set_data(index, &index_data);
}
@@
-1927,7
+1932,7
@@
static int relay_recv_index(struct lttcomm_relayd_hdr *recv_hdr,
ERR("relay_index_get_by_id_or_create index NULL");
goto end_stream_put;
}
ERR("relay_index_get_by_id_or_create index NULL");
goto end_stream_put;
}
- if (set_index_control_data(index, &index_info)) {
+ if (set_index_control_data(index, &index_info
, conn
)) {
ERR("set_index_control_data error");
relay_index_put(index);
ret = -1;
ERR("set_index_control_data error");
relay_index_put(index);
ret = -1;
This page took
0.025051 seconds
and
4
git commands to generate.