From: Lennart Poettering Date: Wed, 28 Feb 2024 10:29:04 +0000 (+0100) Subject: resolved: exit function if varlink_dispatch() returns > 0 X-Git-Tag: v256-rc1~711 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6a145157eba0d93e60d0dd2f5e72539a718ba874;p=thirdparty%2Fsystemd.git resolved: exit function if varlink_dispatch() returns > 0 varlink_dispatch() returns > 0 if it already replied to the method call, hence this is reason to return from the handler function, and not proceed. --- diff --git a/src/resolve/resolved-varlink.c b/src/resolve/resolved-varlink.c index a85a2786762..6e6e973f94a 100644 --- a/src/resolve/resolved-varlink.c +++ b/src/resolve/resolved-varlink.c @@ -1016,7 +1016,7 @@ static int vl_method_resolve_service(Varlink* link, JsonVariant* parameters, Var return -EINVAL; r = varlink_dispatch(link, parameters, dispatch_table, &p); - if (r < 0) + if (r != 0) return r; if (p.ifindex < 0)