mirror of
https://github.com/systemd/systemd.git
synced 2025-01-05 13:18:06 +03:00
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.
This commit is contained in:
parent
614a6770f9
commit
302cc03cc8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user