summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-varlink/sd-varlink.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-08-16 02:25:52 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-08-19 04:36:32 +0200
commit302cc03cc87ec8cb5667984baa2fd5456fac5dca (patch)
treedda2e5618e8e2f28fc90928f428aeb3ddc1e0c18 /src/libsystemd/sd-varlink/sd-varlink.c
parentresolvectl: acquire DBus connection only when necessary (diff)
downloadsystemd-302cc03cc87ec8cb5667984baa2fd5456fac5dca.tar.xz
systemd-302cc03cc87ec8cb5667984baa2fd5456fac5dca.zip
sd-varlink: allow to dispatch method again on pending-method-more state
Otherwise, polkit authentication does not work for methods that require the MORE flag.
Diffstat (limited to '')
-rw-r--r--src/libsystemd/sd-varlink/sd-varlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-varlink/sd-varlink.c b/src/libsystemd/sd-varlink/sd-varlink.c
index 7639f72f89..1369dfbb77 100644
--- a/src/libsystemd/sd-varlink/sd-varlink.c
+++ b/src/libsystemd/sd-varlink/sd-varlink.c
@@ -1514,7 +1514,7 @@ _public_ int sd_varlink_dispatch_again(sd_varlink *v) {
if (v->state == VARLINK_DISCONNECTED)
return varlink_log_errno(v, SYNTHETIC_ERRNO(ENOTCONN), "Not connected.");
- if (v->state != VARLINK_PENDING_METHOD)
+ if (!IN_SET(v->state, VARLINK_PENDING_METHOD, VARLINK_PENDING_METHOD_MORE))
return varlink_log_errno(v, SYNTHETIC_ERRNO(EBUSY), "Connection has no pending method.");
varlink_set_state(v, VARLINK_IDLE_SERVER);