diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2013-09-26 10:19:33 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2013-09-27 13:26:09 +0200 |
commit | 9dff830692c8ff0fe69291e4bc882e4060d77542 (patch) | |
tree | 9e21aa8d54b24b6efd1ec5e640e6ba314cfe2474 /introspection | |
parent | f9bb4bb2ca122d0e6f091a23ebad68dcdac52ca6 (diff) |
vpn: fix connecting to VPN (bgo #708255)
The ConnectInteractive() -> Connect() fallback code doesn't work, because
_connect_internal() changes the state to NM_VPN_SERVICE_STATE_STARTING before
checking if it can implement ConnectInteractive(), and then when the Connect()
call comes in, the VPN is not in STOPPED or INIT, so it returns an error.
The commit moves setting state to STARTING after the ConnectInteractive() check
availability, in the plugin. We introduce new plugin error and set it when the
the plugin does not implement ConnectInteractive(). NetworkManager uses this
error for ConnectInteractive() -> Connect() fallback.
https://bugzilla.gnome.org/show_bug.cgi?id=708255
Diffstat (limited to 'introspection')
-rw-r--r-- | introspection/nm-vpn-plugin.xml | 2 | ||||
-rw-r--r-- | introspection/vpn-errors.xml | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/introspection/nm-vpn-plugin.xml b/introspection/nm-vpn-plugin.xml index 79081f7b2e..07397c2b97 100644 --- a/introspection/nm-vpn-plugin.xml +++ b/introspection/nm-vpn-plugin.xml @@ -52,6 +52,7 @@ <tp:error name="org.freedesktop.NetworkManager.VPN.Error.BadArguments"/> <tp:error name="org.freedesktop.NetworkManager.VPN.Error.LaunchFailed"/> <tp:error name="org.freedesktop.NetworkManager.VPN.Error.WrongState"/> + <tp:error name="org.freedesktop.NetworkManager.VPN.Error.InteractiveNotSupported"/> </tp:possible-errors> </method> @@ -191,6 +192,7 @@ <tp:error name="org.freedesktop.NetworkManager.VPN.Error.WrongState"/> <tp:error name="org.freedesktop.NetworkManager.VPN.Error.BadArguments"/> <tp:error name="org.freedesktop.NetworkManager.VPN.Error.LaunchFailed"/> + <tp:error name="org.freedesktop.NetworkManager.VPN.Error.InteractiveNotSupported"/> </tp:possible-errors> </method> diff --git a/introspection/vpn-errors.xml b/introspection/vpn-errors.xml index 0dba7e6fb9..c5bf73d972 100644 --- a/introspection/vpn-errors.xml +++ b/introspection/vpn-errors.xml @@ -28,5 +28,11 @@ <tp:error name="ConnectionInvalid"> <tp:docstring>The request could not be processed because the VPN connection settings were invalid.</tp:docstring> </tp:error> + <tp:error name="InteractiveNotSupported"> + <tp:docstring> + The request could not be processed because the plugin does not support + interactive operations, such as ConnectInteractive() or NewSecrets(). + </tp:docstring> + </tp:error> </tp:errors> |