static int relayd_create_session_2_11(struct lttcomm_relayd_sock *rsock,
const char *session_name, const char *hostname,
int session_live_timer, unsigned int snapshot,
- uint64_t sessiond_session_id, const lttng_uuid sessiond_uuid)
+ uint64_t sessiond_session_id, const lttng_uuid sessiond_uuid,
+ const uint64_t *current_chunk_id)
{
int ret;
struct lttcomm_relayd_create_session_2_11 *msg = NULL;
lttng_uuid_copy(msg->sessiond_uuid, sessiond_uuid);
msg->session_id = htobe64(sessiond_session_id);
+ if (current_chunk_id) {
+ LTTNG_OPTIONAL_SET(&msg->current_chunk_id,
+ htobe64(*current_chunk_id));
+ }
+
/* Send command */
ret = send_command(rsock, RELAYD_CREATE_SESSION, msg, msg_length, 0);
if (ret < 0) {
const char *session_name, const char *hostname,
int session_live_timer,
unsigned int snapshot, uint64_t sessiond_session_id,
- const lttng_uuid sessiond_uuid)
+ const lttng_uuid sessiond_uuid,
+ const uint64_t *current_chunk_id)
{
int ret;
struct lttcomm_relayd_status_session reply;
/* From 2.11 to ... */
ret = relayd_create_session_2_11(rsock, session_name,
hostname, session_live_timer, snapshot,
- sessiond_session_id, sessiond_uuid);
+ sessiond_session_id, sessiond_uuid,
+ current_chunk_id);
}
if (ret < 0) {
#include <common/index/ctf-index.h>
#include <common/macros.h>
#include <common/compat/uuid.h>
+#include <common/optional.h>
#define RELAYD_VERSION_COMM_MAJOR VERSION_MAJOR
#define RELAYD_VERSION_COMM_MINOR VERSION_MINOR
lttng_uuid sessiond_uuid;
/* Sessiond session id */
uint64_t session_id;
+ LTTNG_OPTIONAL_COMM(uint64_t) current_chunk_id;
/* Contains the session_name and hostname */
char names[];
} LTTNG_PACKED;