summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
220476b)
Convert lttng_live_destroy_session to a destructor. Add a new
lttng_live_destroy_session function that calls delete, it's still needed
for the GPtrArray (which will be removed in a subsequent patch).
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Change-Id: Icb2d9c33fb3591e206698b37c9d658ff731184ad
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8466
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12381
Tested-by: jenkins <jenkins@lttng.org>
-static void lttng_live_destroy_session(struct lttng_live_session *session)
+lttng_live_session::~lttng_live_session()
- if (!session) {
- goto end;
- }
+ BT_CPPLOGD_SPEC(this->logger, "Destroying live session: session-id={}, session-name=\"{}\"",
+ this->id, this->session_name);
- BT_CPPLOGD_SPEC(session->logger, "Destroying live session: session-id={}, session-name=\"{}\"",
- session->id, session->session_name);
- if (session->id != -1ULL) {
- if (lttng_live_session_detach(session)) {
- if (!lttng_live_graph_is_canceled(session->lttng_live_msg_iter)) {
+ if (this->id != -1ULL) {
+ if (lttng_live_session_detach(this)) {
+ if (!lttng_live_graph_is_canceled(this->lttng_live_msg_iter)) {
/* Old relayd cannot detach sessions. */
/* Old relayd cannot detach sessions. */
- BT_CPPLOGD_SPEC(session->logger, "Unable to detach lttng live session {}",
- session->id);
+ BT_CPPLOGD_SPEC(this->logger, "Unable to detach lttng live session {}", this->id);
+static void lttng_live_destroy_session(struct lttng_live_session *session)
+{
}
static void lttng_live_msg_iter_destroy(struct lttng_live_msg_iter *lttng_live_msg_iter)
}
static void lttng_live_msg_iter_destroy(struct lttng_live_msg_iter *lttng_live_msg_iter)
+ ~lttng_live_session();
+
bt2c::Logger logger;
bt_self_component *self_comp = nullptr;
bt2c::Logger logger;
bt_self_component *self_comp = nullptr;