nm-vpn-service-plugin: increase the quit timer
authorLubomir Rintel <lkundrak@v3.sk>
Thu, 1 Oct 2015 15:17:52 +0000 (17:17 +0200)
committerLubomir Rintel <lkundrak@v3.sk>
Thu, 1 Oct 2015 15:17:52 +0000 (17:17 +0200)
We now (since 3272ff6 libnm/libnm-glib: don't quit in the middle of asking for
secrets) always hook on the quit timer when NM asks the plugin if it needs
secrets. The timer is 20 seconds, which seems too short.

Let's make it three minutes. Don't bother adding another timer or using a
distinct timeout: it does no harm for the plugin to remain unused for three
minutes on a bus.

Another option would be to completely unhook it; however the plugin wouldn't
learn if the user cancelled the NM's secrets request and would remain unused
on the bus forever.

libnm-glib/nm-vpn-plugin.c
libnm/nm-vpn-plugin-old.c
libnm/nm-vpn-service-plugin.c

index 6a728f9..0894fa9 100644 (file)
@@ -69,7 +69,7 @@ static gboolean impl_vpn_plugin_set_failure (NMVPNPlugin *plugin,
 
 #include "nm-vpn-plugin-glue.h"
 
-#define NM_VPN_PLUGIN_QUIT_TIMER    20
+#define NM_VPN_PLUGIN_QUIT_TIMER    180
 
 G_DEFINE_ABSTRACT_TYPE (NMVPNPlugin, nm_vpn_plugin, G_TYPE_OBJECT)
 
index f31daab..cfc8c66 100644 (file)
@@ -37,7 +37,7 @@
 
 #include "nmdbus-vpn-plugin.h"
 
-#define NM_VPN_PLUGIN_OLD_QUIT_TIMER    20
+#define NM_VPN_PLUGIN_OLD_QUIT_TIMER    180
 
 static void nm_vpn_plugin_old_initable_iface_init (GInitableIface *iface);
 
index d272d8c..fc4cfdc 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "nmdbus-vpn-plugin.h"
 
-#define NM_VPN_SERVICE_PLUGIN_QUIT_TIMER    20
+#define NM_VPN_SERVICE_PLUGIN_QUIT_TIMER    180
 
 static void nm_vpn_service_plugin_initable_iface_init (GInitableIface *iface);