summary refs log tree commit diff
path: root/libnm/nm-vpn-service-plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm/nm-vpn-service-plugin.c')
-rw-r--r--libnm/nm-vpn-service-plugin.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c
index da4c2446..2213824e 100644
--- a/libnm/nm-vpn-service-plugin.c
+++ b/libnm/nm-vpn-service-plugin.c
@@ -27,6 +27,7 @@
 #include <signal.h>
 #include <stdlib.h>
 
+#include "nm-utils/nm-secret-utils.h"
 #include "nm-enum-types.h"
 #include "nm-utils.h"
 #include "nm-connection.h"
@@ -385,6 +386,10 @@ nm_vpn_service_plugin_set_config (NMVpnServicePlugin *plugin,
 	g_signal_emit (plugin, signals[CONFIG], 0, config);
 	if (priv->dbus_vpn_service_plugin)
 		nmdbus_vpn_plugin_emit_config (priv->dbus_vpn_service_plugin, config);
+
+	if (   priv->has_ip4 == priv->got_ip4
+	    && priv->has_ip6 == priv->got_ip6)
+		nm_vpn_service_plugin_set_state (plugin, NM_VPN_SERVICE_STATE_STARTED);
 }
 
 void
@@ -478,10 +483,10 @@ connect_timer_start (NMVpnServicePlugin *plugin)
 
 static void
 peer_vanished (GDBusConnection *connection,
-               const gchar *sender_name,
-               const gchar *object_path,
-               const gchar *interface_name,
-               const gchar *signal_name,
+               const char *sender_name,
+               const char *object_path,
+               const char *interface_name,
+               const char *signal_name,
                GVariant *parameters,
                gpointer user_data)
 {
@@ -493,7 +498,7 @@ watch_peer (NMVpnServicePlugin *plugin,
             GDBusMethodInvocation *context)
 {
 	GDBusConnection *connection = g_dbus_method_invocation_get_connection (context);
-	const gchar *peer = g_dbus_message_get_sender (g_dbus_method_invocation_get_message (context));
+	const char *peer = g_dbus_message_get_sender (g_dbus_method_invocation_get_message (context));
 
 	return g_dbus_connection_signal_subscribe (connection,
 	                                           "org.freedesktop.DBus",
@@ -784,7 +789,7 @@ nm_vpn_service_plugin_read_vpn_details (int fd,
 	gboolean success = FALSE;
 	char *key = NULL, *val = NULL;
 	nm_auto_free_gstring GString *line = NULL;
-	gchar c;
+	char c;
 
 	if (out_data)
 		g_return_val_if_fail (*out_data == NULL, FALSE);