[network-manager-fortisslvpn/nm-1-0] service: fix the error status handling
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-fortisslvpn/nm-1-0] service: fix the error status handling
- Date: Tue, 13 Oct 2015 18:21:57 +0000 (UTC)
commit ea61a42674167d2a9bad3d2e0fd0b4288ac097aa
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Tue Oct 13 20:05:22 2015 +0200
service: fix the error status handling
This has been copied from pptp but makes no sense for openfortivpn.
(cherry picked from commit 7b7ffca2ec9443878dd8a86fa168484fec2b23e7)
src/nm-fortisslvpn-service.c | 22 ++++------------------
1 files changed, 4 insertions(+), 18 deletions(-)
---
diff --git a/src/nm-fortisslvpn-service.c b/src/nm-fortisslvpn-service.c
index c80a8a1..bcc4394 100644
--- a/src/nm-fortisslvpn-service.c
+++ b/src/nm-fortisslvpn-service.c
@@ -580,24 +580,10 @@ openfortivpn_watch_cb (GPid pid, gint status, gpointer user_data)
waitpid (priv->pid, NULL, WNOHANG);
priv->pid = 0;
- /* Must be after data->state is set since signals use data->state */
- switch (error) {
- case 16:
- /* hangup */
- // FIXME: better failure reason
- nm_vpn_plugin_failure (NM_VPN_PLUGIN (plugin), NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED);
- break;
- case 2:
- /* Couldn't log in due to bad user/pass */
- nm_vpn_plugin_failure (NM_VPN_PLUGIN (plugin), NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED);
- break;
- case 1:
- /* Other error (couldn't bind to address, etc) */
- nm_vpn_plugin_failure (NM_VPN_PLUGIN (plugin), NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED);
- break;
- default:
- break;
- }
+ /* TODO: Better error indication from openfortivpn. */
+ if (error)
+ nm_vpn_plugin_failure (NM_VPN_PLUGIN (plugin),
+ NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED);
nm_vpn_plugin_set_state (NM_VPN_PLUGIN (plugin), NM_VPN_SERVICE_STATE_STOPPED);
cleanup_plugin (plugin);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]