projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
port: add support for BSD mktemp
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
session.cpp
diff --git
a/src/bin/lttng-relayd/session.cpp
b/src/bin/lttng-relayd/session.cpp
index abefc0d276ef355fefa11cc60d60de554e27b3da..6e29fbc741afd1efe32723f7342f8cc809fa9a3c 100644
(file)
--- a/
src/bin/lttng-relayd/session.cpp
+++ b/
src/bin/lttng-relayd/session.cpp
@@
-281,7
+281,7
@@
struct relay_session *session_create(const char *session_name,
const char *hostname, const char *base_path,
uint32_t live_timer,
bool snapshot,
const char *hostname, const char *base_path,
uint32_t live_timer,
bool snapshot,
- const lttng_uuid sessiond_uuid,
+ const lttng_uuid
&
sessiond_uuid,
const uint64_t *id_sessiond,
const uint64_t *current_chunk_id,
const time_t *creation_time,
const uint64_t *id_sessiond,
const uint64_t *current_chunk_id,
const time_t *creation_time,
@@
-310,7
+310,7
@@
struct relay_session *session_create(const char *session_name,
goto error;
}
goto error;
}
- session =
(relay_session *) zmalloc(sizeof(*session)
);
+ session =
zmalloc<relay_session>(
);
if (!session) {
PERROR("Failed to allocate session");
goto error;
if (!session) {
PERROR("Failed to allocate session");
goto error;
@@
-363,7
+363,7
@@
struct relay_session *session_create(const char *session_name,
session->live_timer = live_timer;
session->snapshot = snapshot;
session->live_timer = live_timer;
session->snapshot = snapshot;
-
lttng_uuid_copy(session->sessiond_uuid, sessiond_uuid)
;
+
session->sessiond_uuid = sessiond_uuid
;
if (id_sessiond) {
LTTNG_OPTIONAL_SET(&session->id_sessiond, *id_sessiond);
if (id_sessiond) {
LTTNG_OPTIONAL_SET(&session->id_sessiond, *id_sessiond);
@@
-464,7
+464,7
@@
struct relay_session *session_get_by_id(uint64_t id)
DBG("Session find by ID %" PRIu64 " id NOT found", id);
goto end;
}
DBG("Session find by ID %" PRIu64 " id NOT found", id);
goto end;
}
- session =
caa_container_of(node, struct relay_session,
session_n);
+ session =
lttng::utils::container_of(node, &relay_session::
session_n);
DBG("Session find by ID %" PRIu64 " id found", id);
if (!session_get(session)) {
session = NULL;
DBG("Session find by ID %" PRIu64 " id found", id);
if (!session_get(session)) {
session = NULL;
@@
-527,8
+527,7
@@
bool session_has_ongoing_rotation(const struct relay_session *session)
goto next_session;
}
goto next_session;
}
- if (!lttng_uuid_is_equal(session->sessiond_uuid,
- iterated_session->sessiond_uuid)) {
+ if (session->sessiond_uuid != iterated_session->sessiond_uuid) {
/* Sessions do not originate from the same sessiond. */
goto next_session;
}
/* Sessions do not originate from the same sessiond. */
goto next_session;
}
@@
-610,7
+609,7
@@
static void destroy_session(struct relay_session *session)
static void session_release(struct urcu_ref *ref)
{
struct relay_session *session =
static void session_release(struct urcu_ref *ref)
{
struct relay_session *session =
-
caa_container_of(ref, struct relay_session,
ref);
+
lttng::utils::container_of(ref, &relay_session::
ref);
destroy_session(session);
}
destroy_session(session);
}
This page took
0.024 seconds
and
4
git commands to generate.