GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit 282d9b0e authored by Lubomir Rintel's avatar Lubomir Rintel 🥕
Browse files

vpn: Propagate daemon exec error correctly

NetworkManager[31624]: <warn>  VPN service 'openvpn': could not launch the VPN service. error: (8) Failed to execute child process "/usr/local/libexec/nm-openvpn-service" (No such file or directory).
**
NetworkManager:ERROR:nm-manager.c:3094:_activation_auth_done: assertion failed: (error)
parent 51974196
...@@ -54,7 +54,7 @@ typedef struct { ...@@ -54,7 +54,7 @@ typedef struct {
#define VPN_CONNECTION_GROUP "VPN Connection" #define VPN_CONNECTION_GROUP "VPN Connection"
static gboolean start_pending_vpn (NMVpnService *self); static gboolean start_pending_vpn (NMVpnService *self, GError **error);
NMVpnService * NMVpnService *
nm_vpn_service_new (const char *namefile, GError **error) nm_vpn_service_new (const char *namefile, GError **error)
...@@ -130,7 +130,7 @@ connection_vpn_state_changed (NMVpnConnection *connection, ...@@ -130,7 +130,7 @@ connection_vpn_state_changed (NMVpnConnection *connection,
g_signal_handlers_disconnect_by_func (connection, G_CALLBACK (connection_vpn_state_changed), self); g_signal_handlers_disconnect_by_func (connection, G_CALLBACK (connection_vpn_state_changed), self);
if (connection == priv->active) { if (connection == priv->active) {
priv->active = NULL; priv->active = NULL;
start_pending_vpn (self); start_pending_vpn (self, NULL);
} else } else
priv->pending = g_slist_remove (priv->pending, connection); priv->pending = g_slist_remove (priv->pending, connection);
g_object_unref (connection); g_object_unref (connection);
...@@ -253,7 +253,7 @@ start_active_vpn (NMVpnService *self, GError **error) ...@@ -253,7 +253,7 @@ start_active_vpn (NMVpnService *self, GError **error)
} }
static gboolean static gboolean
start_pending_vpn (NMVpnService *self) start_pending_vpn (NMVpnService *self, GError **error)
{ {
NMVpnServicePrivate *priv = NM_VPN_SERVICE_GET_PRIVATE (self); NMVpnServicePrivate *priv = NM_VPN_SERVICE_GET_PRIVATE (self);
...@@ -266,7 +266,7 @@ start_pending_vpn (NMVpnService *self) ...@@ -266,7 +266,7 @@ start_pending_vpn (NMVpnService *self)
priv->active = g_slist_nth_data (priv->pending, 0); priv->active = g_slist_nth_data (priv->pending, 0);
priv->pending = g_slist_remove (priv->pending, priv->active); priv->pending = g_slist_remove (priv->pending, priv->active);
return start_active_vpn (self, NULL); return start_active_vpn (self, error);
} }
gboolean gboolean
...@@ -300,7 +300,7 @@ nm_vpn_service_activate (NMVpnService *service, ...@@ -300,7 +300,7 @@ nm_vpn_service_activate (NMVpnService *service,
} }
/* Otherwise start the next VPN */ /* Otherwise start the next VPN */
return start_pending_vpn (service); return start_pending_vpn (service, error);
} }
static void static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment