condition: buffer usage: validation does not check for ratio and bytes threshold
[lttng-tools.git] / src / common / conditions / buffer-usage.c
index cc9e9cde89aade3eb0a5059ca3fe628457fd1260..a97f6d59f74b36b6d9eb9f1ef5c4994968659a00 100644 (file)
@@ -62,8 +62,8 @@ bool lttng_condition_buffer_usage_validate(
                ERR("Invalid buffer condition: a target channel name must be set.");
                goto end;
        }
-       if (!usage->threshold_ratio.set && !usage->threshold_bytes.set) {
-               ERR("Invalid buffer condition: a threshold must be set.");
+       if (usage->threshold_ratio.set == usage->threshold_bytes.set) {
+               ERR("Invalid buffer condition: a threshold must be set or both type cannot be used simultaneously.");
                goto end;
        }
        if (!usage->domain.set) {
This page took 0.023962 seconds and 5 git commands to generate.