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



commit 5f26ae2e0468fd849928c334ca5d2a20c87fc207
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 1ef4b44..a4521f4 100644
--- a/src/connection-editor/page-mobile.c
+++ b/src/connection-editor/page-mobile.c
@@ -293,7 +293,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]