From 7c3e220e6567084442b6c19ae4097c6d496f4ed8 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Sun, 2 Jun 2024 17:49:23 +0200 Subject: [PATCH] mxqd_control: Check prerequisites against empty group tags We want to be able to use group tags as a stigma so that servers can be configured to accept only jobs without certain tags. For example, mxqi can add a tag "mxqi" to its jobs and the servers which shouldn't run mxqi jobs can use "!mxqi" as their prerequisites. However, for that to work, we need to evaluate server prerequistes even for jobs which don't have any tags. Remove the check, which skips server prerequistes evaluation for jobs without tags. --- mxqd_control.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mxqd_control.c b/mxqd_control.c index d51ffebc..7a00b127 100644 --- a/mxqd_control.c +++ b/mxqd_control.c @@ -35,9 +35,6 @@ static int server_is_qualified(struct mxq_server *server, struct mxq_group *grou return 0; // evaluated to false } if (*server->daemon.prerequisites != 0) { - if (*group->tags == 0) { - return 0; - } _mx_cleanup_(keywordset_free_byref) struct keywordset *kws = keywordset_new(group->tags); struct parser_context parser_context = { .input = server->daemon.prerequisites,