Generate bytecodes related to the trigger on reception
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.c
index 2f5a4e98c74978d8ac8d7480cb539bc595e2afd7..2abcdf48eb5f161e207d48288c07cfa781116b2f 100644 (file)
@@ -4342,6 +4342,15 @@ int cmd_register_trigger(struct command_ctx *cmd_ctx, int sock,
                }
        }
 
+       /*
+        * The bytecode generation also serves as a validation step for the
+        * bytecode expressions.
+        */
+       ret = lttng_trigger_generate_bytecode(trigger, &cmd_creds);
+       if (ret != LTTNG_OK) {
+               goto end;
+       }
+
        /*
         * A reference to the trigger is acquired by the notification thread.
         * It is safe to return the same trigger to the caller since it the
This page took 0.023088 seconds and 4 git commands to generate.