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.
This commit is contained in:
Lennart Poettering 2024-02-28 11:29:04 +01:00 committed by Luca Boccassi
parent f9f5ce61fa
commit 6a145157eb

View file

@ -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)