From: Lennart Poettering Date: Wed, 28 Sep 2022 09:44:57 +0000 (+0200) Subject: resolved: return regular varlink invalid parameter error if more is not specified... X-Git-Tag: v252-rc1~73 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=43bd70d58450e03eabbcdf4265f4099353b6b40f;p=thirdparty%2Fsystemd.git 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 --- 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);