LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File NetworkManager-novellvpn-dhgroup-pfsgroup-default.patch of Package NetworkManager-novellvpn (Project home:pchenthill:NetworkManager-novellpvn)

Index: NetworkManager-novellvpn-0.7.2/src/nm-novellvpn-service.c
===================================================================
--- NetworkManager-novellvpn-0.7.2.orig/src/nm-novellvpn-service.c
+++ NetworkManager-novellvpn-0.7.2/src/nm-novellvpn-service.c
@@ -574,12 +574,10 @@ nm_novellvpn_start_novellvpn_binary (NMN
 		return FALSE;
 	}
 
-	/* every gateway has the dhgroup */
+	// every gateway has the dhgroup
+	// when user don't set the dhgroup, use the default value
 	tmp = nm_setting_vpn_get_data_item (s_vpn, NM_NOVELLVPN_KEY_DHGROUP);
-	if (!tmp || !strlen (tmp)) {
-		nm_vpn_set_missing_arg_error (error, NM_NOVELLVPN_KEY_DHGROUP);
-		return FALSE;
-	} else {
+	if (tmp && strlen (tmp)) {
 		gint dhgroup = DHGROUP_INVALID;
 
 		dhgroup = (gint) strtol (tmp, NULL, 10);
@@ -591,12 +589,10 @@ nm_novellvpn_start_novellvpn_binary (NMN
 		}
 	}
 
-	/* every gateway has the pfsgroup */
+	// every gateway has the pfsgroup
+	// when user don't set the pfsgroup, use the default value
 	tmp = nm_setting_vpn_get_data_item (s_vpn, NM_NOVELLVPN_KEY_PFSGROUP);
-	if (!tmp || !strlen (tmp)) {
-		nm_vpn_set_missing_arg_error (error, NM_NOVELLVPN_KEY_PFSGROUP);
-		return FALSE;
-	} else {
+	if (tmp && strlen (tmp)) {
 		gint pfsgroup = PFSGROUP_INVALID;
 
 		pfsgroup = (gint) strtol (tmp, NULL, 10);
@@ -608,10 +604,9 @@ nm_novellvpn_start_novellvpn_binary (NMN
 		}
 	} 
 
+	// when user don't set the split_tunnle, use the default value
 	tmp = nm_setting_vpn_get_data_item (s_vpn, NM_NOVELLVPN_KEY_NOSPLITTUNNEL);
-	if (!tmp || !strlen (tmp)) {
-		nm_vpn_set_missing_arg_error (error, NM_NOVELLVPN_KEY_NOSPLITTUNNEL);
-	} else {
+	if (tmp && strlen (tmp)) {
 		nm_debug("%s = %s!", NM_NOVELLVPN_KEY_NOSPLITTUNNEL, tmp);
 		if (!strcmp (tmp, "yes")) {
 			no_split_tunnel = TRUE;