[network-manager-applet] editor: allow _ as a valid character for GSM APNs



commit 2d19ae0fb361d0f3f845e1842bfc046c2c68a7aa
Author: Dan Williams <dcbw redhat com>
Date:   Tue May 17 11:18:51 2011 -0500

    editor: allow _ as a valid character for GSM APNs
    
    The ETSI specs state that valid characters are only ASCII alphanumeric
    characters, but then state that APNs should generally follow DNS
    naming rules.  Well, that means a lot more characters are allowed,
    but modems don't like many of them.  So let's slowly allow more
    characters as people find ones that actually are used.  The restriction
    was originally put in place to disallow spaces, because they
    certainly aren't allowed APN characters and modems and the
    network puke when they see spaces.

 src/connection-editor/page-mobile.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/connection-editor/page-mobile.c b/src/connection-editor/page-mobile.c
index 348515c..ab2e2ee 100644
--- a/src/connection-editor/page-mobile.c
+++ b/src/connection-editor/page-mobile.c
@@ -300,7 +300,10 @@ apn_filter_cb (GtkEntry *   entry,
 	gchar *result = g_new0 (gchar, length);
 
 	for (i = 0; i < length; i++) {
-		if (isalnum (text[i]) || (text[i] == '.') || (text[i] == '-'))
+		if (   isalnum (text[i])
+		    || (text[i] == '.')
+		    || (text[i] == '_')
+		    || (text[i] == '-'))
 			result[count++] = text[i];
 	}
 



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