]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/varlink.h
varlink: automatically send ExpectedMore error message back when we were called witho...
authorLennart Poettering <lennart@poettering.net>
Wed, 11 Oct 2023 14:51:30 +0000 (16:51 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 11 Oct 2023 16:19:36 +0000 (18:19 +0200)
commit47c9bbb1abff0baa30ef0a12388c4711ccb5f55e
tree324801e7326141e272b6564caf553b2a9faee7c3
parent4f10005e175bef552c8dabc08dbb6055ae6dd3a4
varlink: automatically send ExpectedMore error message back when we were called without more=true set, but need it

Various Varlink calls only make sense if they are called with more=true
(i.e. in a mode where multiple replies are expected to be sent). If a
method call assumes it is called with more (manifested in the fact it
calls varlink_notify(), the call to reply to such messages) let's return
a recognizable error code for the violated expectation.

This adds a new error for this, org.varlink.service.ExpectedMore. Note
we are squatting the official org.varlink.service namespace, but for
such a basic thing it makes sense to add it there.
src/shared/varlink-org.varlink.service.c
src/shared/varlink.c
src/shared/varlink.h