From acf68dd9b5ce330a3396d8aac52764e6ede9578e Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 15 Apr 2021 08:28:29 +0200 Subject: [PATCH 1/2] mxqd_control: Honor daemon prerequisites .vs. group tags --- mxqd_control.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mxqd_control.c b/mxqd_control.c index 46080c43..138963c8 100644 --- a/mxqd_control.c +++ b/mxqd_control.c @@ -34,6 +34,22 @@ static int server_is_qualified(struct mxq_server *server, struct mxq_group *grou if (parser_context.result == 0) 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, + .tags = kws, + .pos = 0, + .result = 0, + }; + if (yyparse(&parser_context)) + return 0; // syntax error in expression + if (parser_context.result == 0) + return 0; // evaluated to false + } return (1); } From 50e80e63f21083fcaec86abc4e8b357769789a99 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 15 Apr 2021 08:34:23 +0200 Subject: [PATCH 2/2] MXQ bump version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 97f7cd86..065844af 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ MXQ_VERSION_MAJOR = 0 MXQ_VERSION_MINOR = 27 -MXQ_VERSION_PATCH = 1 +MXQ_VERSION_PATCH = 2 MXQ_VERSION_EXTRA = "beta" MXQ_VERSIONDATE = 2021