sessiond: ust: conditionally enable the underscore prefix variant quirk
[lttng-tools.git] / src / bin / lttng-sessiond / notification-thread-events.cpp
index a93b4cb95975a90356b052bdfce798bffbfff504..64c3fc4f3f03d1d1116b04237a03cbbb4c8cbd83 100644 (file)
@@ -48,7 +48,7 @@
 #include "lttng-sessiond.hpp"
 #include "kernel.hpp"
 
-#define CLIENT_POLL_EVENTS_IN (LPOLLIN | LPOLLERR | LPOLLHUP | LPOLLRDHUP)
+#define CLIENT_POLL_EVENTS_IN (LPOLLIN | LPOLLRDHUP)
 #define CLIENT_POLL_EVENTS_IN_OUT (CLIENT_POLL_EVENTS_IN | LPOLLOUT)
 
 /* The tracers currently limit the capture size to PIPE_BUF (4kb on linux). */
@@ -1107,13 +1107,12 @@ int evaluate_session_condition(
        }
        case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED:
        {
-               const auto rotation_id = new_state ?
-                               new_state->rotation.id :
-                                     session_info->last_state_sample.rotation.id;
+               const auto& sample = new_state ? *new_state : session_info->last_state_sample;
+               const auto rotation_id = sample.rotation.id;
 
                /* Callee acquires a reference to location. */
                *evaluation = lttng_evaluation_session_rotation_completed_create(
-                               rotation_id, new_state->rotation.location);
+                               rotation_id, sample.rotation.location);
                break;
        }
        case LTTNG_CONDITION_TYPE_SESSION_CONSUMED_SIZE:
@@ -2209,7 +2208,7 @@ int handle_notification_thread_command_add_tracer_event_source(
                        lttng_domain_type_str(domain_type));
 
        /* Adding the read side pipe to the event poll. */
-       ret = lttng_poll_add(&state->events, tracer_event_source_fd, LPOLLPRI | LPOLLIN | LPOLLERR);
+       ret = lttng_poll_add(&state->events, tracer_event_source_fd, LPOLLPRI | LPOLLIN);
        if (ret < 0) {
                ERR("Failed to add tracer event source to poll set: tracer_event_source_fd = %d, domain = '%s'",
                                tracer_event_source_fd,
@@ -2965,6 +2964,7 @@ int handle_notification_thread_command_register_trigger(
                        client_list = notification_client_list_create(state, condition);
                        if (!client_list) {
                                ERR("Error creating notification client list for trigger %s", trigger->name);
+                               ret = -1;
                                goto error_free_ht_element;
                        }
                }
This page took 0.024508 seconds and 4 git commands to generate.