} while (0);
BT_HIDDEN
-bool lttng_live_graph_is_canceled(struct lttng_live_component *lttng_live)
+bool lttng_live_graph_is_canceled(struct lttng_live_msg_iter *msg_iter)
{
- const bt_component *component;
bool ret;
- if (!lttng_live) {
+ if (!msg_iter) {
ret = false;
goto end;
}
- component = bt_self_component_as_component(lttng_live->self_comp);
- ret = bt_component_graph_is_canceled(component);
+ ret = bt_self_message_iterator_is_interrupted(
+ msg_iter->self_msg_iter);
end:
return ret;
static
void lttng_live_destroy_session(struct lttng_live_session *session)
{
- struct lttng_live_component *live_comp;
bt_logging_level log_level;
bt_self_component *self_comp;
BT_COMP_LOGD("Destroy lttng live session");
if (session->id != -1ULL) {
if (lttng_live_detach_session(session)) {
- live_comp = session->lttng_live_msg_iter->lttng_live_comp;
if (session->lttng_live_msg_iter &&
- !lttng_live_graph_is_canceled(live_comp)) {
+ !lttng_live_graph_is_canceled(
+ session->lttng_live_msg_iter)) {
/* Old relayd cannot detach sessions. */
BT_COMP_LOGD("Unable to detach lttng live session %" PRIu64,
session->id);
ret = lttng_live_attach_session(session);
if (ret) {
if (lttng_live_msg_iter && lttng_live_graph_is_canceled(
- lttng_live_msg_iter->lttng_live_comp)) {
+ lttng_live_msg_iter)) {
status = LTTNG_LIVE_ITERATOR_STATUS_AGAIN;
} else {
status = LTTNG_LIVE_ITERATOR_STATUS_ERROR;
goto error;
}
- if (lttng_live_graph_is_canceled(lttng_live)) {
- ret = BT_COMPONENT_CLASS_INIT_METHOD_STATUS_ERROR;
- goto error;
- }
-
add_port_status = bt_self_component_source_add_output_port(
self_comp_src, "out", NULL, NULL);
switch (add_port_status) {