[network-manager-openvpn/NM_0_8] properties/ui: increase upper limit for --reneg-sec to 604800 (bgo #639560)



commit ed8d481e52fb1e385699c99c980ea7d858b64e03
Author: JiÅ?í KlimeÅ¡ <jklimes redhat com>
Date:   Tue Jan 18 12:08:08 2011 +0100

    properties/ui: increase upper limit for --reneg-sec to 604800 (bgo #639560)

 properties/auth-helpers.c       |    2 +-
 properties/import-export.c      |    4 ++--
 properties/nm-openvpn-dialog.ui |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 2fa36e0..503e432 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -1236,7 +1236,7 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
 
 		errno = 0;
 		tmp = strtol (value, NULL, 10);
-		if (errno == 0 && tmp >= 0 && tmp < 604800) {  /* up to a week? */
+		if (errno == 0 && tmp >= 0 && tmp <= 604800) {  /* up to a week? */
 			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
 
 			widget = GTK_WIDGET (gtk_builder_get_object (builder, "reneg_spinbutton"));
diff --git a/properties/import-export.c b/properties/import-export.c
index 27ca007..eb5413e 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -15,7 +15,7 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Copyright (C) 2008 - 2010 Dan Williams <dcbw redhat com> and Red Hat, Inc.
+ * Copyright (C) 2008 - 2011 Dan Williams <dcbw redhat com> and Red Hat, Inc.
  *
  **************************************************************************/
 
@@ -393,7 +393,7 @@ do_import (const char *path, char **lines, GError **error)
 
 				errno = 0;
 				secs = strtol (items[0], NULL, 10);
-				if ((errno == 0) && (secs >= 0) && (secs < 604800)) {
+				if ((errno == 0) && (secs >= 0) && (secs <= 604800)) {
 					tmp = g_strdup_printf ("%d", (guint32) secs);
 					nm_setting_vpn_add_data_item (s_vpn, NM_OPENVPN_KEY_RENEG_SECONDS, tmp);
 					g_free (tmp);
diff --git a/properties/nm-openvpn-dialog.ui b/properties/nm-openvpn-dialog.ui
index c159d01..739f4f7 100644
--- a/properties/nm-openvpn-dialog.ui
+++ b/properties/nm-openvpn-dialog.ui
@@ -8,7 +8,7 @@
     <property name="value">1194</property>
   </object>
   <object class="GtkAdjustment" id="adjustment2">
-    <property name="upper">10000</property>
+    <property name="upper">604800</property>
     <property name="lower">0</property>
     <property name="page_increment">10</property>
     <property name="step_increment">1</property>



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