mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user