Fix: sessiond: notification: unreachable code in switch-case
[lttng-tools.git] / src / bin / lttng-sessiond / notification-thread-events.c
index a878c0dbef96b57c3555672b1324d2b9ae6bd9fe..833b550f87067672a682ccc99bcec710361c90be 100644 (file)
@@ -2610,11 +2610,15 @@ int handle_notification_thread_command_register_trigger(
                ret = evaluate_session_condition_for_client(condition, state,
                                &evaluation, &object_uid,
                                &object_gid);
+               LTTNG_OPTIONAL_SET(&object_creds.uid, object_uid);
+               LTTNG_OPTIONAL_SET(&object_creds.gid, object_gid);
                break;
        case LTTNG_OBJECT_TYPE_CHANNEL:
                ret = evaluate_channel_condition_for_client(condition, state,
                                &evaluation, &object_uid,
                                &object_gid);
+               LTTNG_OPTIONAL_SET(&object_creds.uid, object_uid);
+               LTTNG_OPTIONAL_SET(&object_creds.gid, object_gid);
                break;
        case LTTNG_OBJECT_TYPE_NONE:
                ret = 0;
@@ -2630,9 +2634,6 @@ int handle_notification_thread_command_register_trigger(
                goto error_put_client_list;
        }
 
-       LTTNG_OPTIONAL_SET(&object_creds.uid, object_uid);
-       LTTNG_OPTIONAL_SET(&object_creds.gid, object_gid);
-
        DBG("Newly registered trigger's condition evaluated to %s",
                        evaluation ? "true" : "false");
        if (!evaluation) {
This page took 0.023512 seconds and 4 git commands to generate.