NetworkManager r4159 - in trunk/vpn-daemons/vpnc: . properties



Author: dcbw
Date: Thu Oct  9 13:59:13 2008
New Revision: 4159
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=4159&view=rev

Log:
2008-10-09  Dan Williams  <dcbw redhat com>

	* properties/nm-vpnc.c
		- (update_connection): only set DPD timeout if it was something other
			than the default value



Modified:
   trunk/vpn-daemons/vpnc/ChangeLog
   trunk/vpn-daemons/vpnc/properties/nm-vpnc.c

Modified: trunk/vpn-daemons/vpnc/properties/nm-vpnc.c
==============================================================================
--- trunk/vpn-daemons/vpnc/properties/nm-vpnc.c	(original)
+++ trunk/vpn-daemons/vpnc/properties/nm-vpnc.c	Thu Oct  9 13:59:13 2008
@@ -485,9 +485,15 @@
 		                     g_strdup (NM_VPNC_KEY_DPD_IDLE_TIMEOUT),
 		                     g_strdup ("0"));
 	} else {
-		g_hash_table_insert (s_vpn->data,
-		                     g_strdup (NM_VPNC_KEY_DPD_IDLE_TIMEOUT),
-		                     g_strdup_printf ("%d", priv->orig_dpd_timeout));
+		/* If DPD was disabled and now the user wishes to enable it, just
+		 * don't pass the DPD_IDLE_TIMEOUT option to vpnc and thus use the
+		 * default DPD idle time.  Otherwise keep the original DPD idle timeout.
+		 */
+		if (priv->orig_dpd_timeout >= 10) {
+			g_hash_table_insert (s_vpn->data,
+			                     g_strdup (NM_VPNC_KEY_DPD_IDLE_TIMEOUT),
+			                     g_strdup_printf ("%d", priv->orig_dpd_timeout));
+		}
 	}
 
 	/* System secrets get stored in the connection, user secrets are saved



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]