From 43bd70d58450e03eabbcdf4265f4099353b6b40f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 28 Sep 2022 11:44:57 +0200 Subject: [PATCH] resolved: return regular varlink invalid parameter error if more is not specified on monitor call No point in returning EINVAL if we can just return a proper varlink invalid parameter error --- src/resolve/resolved-varlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/resolve/resolved-varlink.c b/src/resolve/resolved-varlink.c index 259a4bb7c6a..75628f054c7 100644 --- a/src/resolve/resolved-varlink.c +++ b/src/resolve/resolved-varlink.c @@ -539,9 +539,9 @@ static int vl_method_subscribe_dns_resolves(Varlink *link, JsonVariant *paramete m = ASSERT_PTR(varlink_server_get_userdata(varlink_get_server(link))); - /* if the client didn't set the more flag, return an empty response and close the connection */ + /* if the client didn't set the more flag, it is using us incorrectly */ if (!FLAGS_SET(flags, VARLINK_METHOD_MORE)) - return varlink_error_errno(link, EINVAL); + return varlink_error_invalid_parameter(link, NULL); if (json_variant_elements(parameters) > 0) return varlink_error_invalid_parameter(link, parameters); -- 2.47.3