[PATCH v2 03/42] vpn-agent: Do connect state transition after input dialog check
Jussi Laakkonen <[email protected]> Wed, 13 Aug 2025 18:01:35 +0300
| Newsgroups | dev.linux.lists.connman |
|---|---|
| Message-ID | <[email protected]> |
When the VPN requests input (credentials) via the VPN agent the
vpn_agent_check_and_process_reply_error() does transition the state of
the VPN provider to connect state when there is no error. This is done
to facilitate the transition from the association state to connect
state as each VPN should use this function to verify the D-Bus reply
and, thus will be called after each reply.
---
vpn/vpn-agent.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/vpn/vpn-agent.c b/vpn/vpn-agent.c
index ab6fea55..f1cc7e36 100644
--- a/vpn/vpn-agent.c
+++ b/vpn/vpn-agent.c
@@ -257,8 +257,12 @@ int vpn_agent_check_and_process_reply_error(DBusMessage *reply,
dbus_error_init(&error);
- if (!dbus_set_error_from_message(&error, reply))
+ if (!dbus_set_error_from_message(&error, reply)) {
+ DBG("Dialog without error, set provider %p to CONNECT",
+ provider);
+ vpn_provider_set_state(provider, VPN_PROVIDER_STATE_CONNECT);
return 0;
+ }
if (!g_strcmp0(error.name, VPN_AGENT_INTERFACE ".Error.Canceled"))
err = ECANCELED;
--
2.39.5