projects
/
connman
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
64ed4af
)
Fix broken invalid character replacement code
author
Marcel Holtmann
<marcel@holtmann.org>
Sat, 13 Dec 2008 00:58:07 +0000
(
01:58
+0100)
committer
Marcel Holtmann
<marcel@holtmann.org>
Sat, 13 Dec 2008 00:58:07 +0000
(
01:58
+0100)
plugins/wifi.c
patch
|
blob
|
history
diff --git
a/plugins/wifi.c
b/plugins/wifi.c
index
e463589
..
533b035
100644
(file)
--- 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++) {
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] = '_';
- temp[i] = g_ascii_tolower(temp[i]);
}
element = find_pending_element(data, network->identifier);
}
element = find_pending_element(data, network->identifier);