diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-13 01:58:07 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-13 01:58:07 +0100 |
commit | 78def9a9658469d9b666c53b901a70b3fd3c209e (patch) | |
tree | d52cf14c21f6dd229d971302fc1f80b02bd7dd0e /plugins/wifi.c | |
parent | 64ed4af748907c3c077d4c5b0755434ec7ac248c (diff) | |
download | connman-78def9a9658469d9b666c53b901a70b3fd3c209e.tar.gz connman-78def9a9658469d9b666c53b901a70b3fd3c209e.tar.bz2 connman-78def9a9658469d9b666c53b901a70b3fd3c209e.zip |
Fix broken invalid character replacement code
Diffstat (limited to 'plugins/wifi.c')
-rw-r--r-- | plugins/wifi.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index e463589e..533b035c 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -254,17 +254,10 @@ static void scan_result(struct connman_element *parent, temp = g_strdup(network->identifier); for (i = 0; i < strlen(temp); i++) { - if (temp[i] == ' ' || temp[i] == '.') - temp[i] = '_'; - else if (temp[i] == '-' || temp[i] == '+') - temp[i] = '_'; - else if (temp[i] == '!' || temp[i] == '?') - temp[i] = '_'; - else if (temp[i] == '(' || temp[i] == ')') - temp[i] = '_'; - else if (g_ascii_isprint(temp[i]) == FALSE) + gchar tmp = g_ascii_tolower(temp[i]); + + if (tmp < 'a' || tmp > 'z') temp[i] = '_'; - temp[i] = g_ascii_tolower(temp[i]); } element = find_pending_element(data, network->identifier); |