[network-manager-applet] editor: fix inserting gateway for manual IPv4



commit 31e9ee0360491d316415967a2e3fcc5686b7c55a
Author: JiÅÃ KlimeÅ <jklimes redhat com>
Date:   Tue Dec 18 15:58:39 2012 +0100

    editor: fix inserting gateway for manual IPv4
    
    When 'Enter' was pressed in gateway field empty string was inserted
    and "Save" button became unsensitive.

 src/connection-editor/page-ip4.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/connection-editor/page-ip4.c b/src/connection-editor/page-ip4.c
index 9cf7b32..ece8501 100644
--- a/src/connection-editor/page-ip4.c
+++ b/src/connection-editor/page-ip4.c
@@ -1122,7 +1122,7 @@ ui_to_setting (CEPageIP4 *self)
 
 		/* Gateway is optional... */
 		gtk_tree_model_get (model, &tree_iter, COL_GATEWAY, &item, -1);
-		if (item && inet_pton (AF_INET, item, &tmp_gateway) <= 0) {
+		if (item && strlen (item) && inet_pton (AF_INET, item, &tmp_gateway) <= 0) {
 			g_warning ("%s: IPv4 gateway '%s' invalid!",
 			           __func__, item ? item : "<none>");
 			g_free (item);



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