summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2003-11-15 10:30:30 +0000
committerLennart Poettering <lennart@poettering.net>2003-11-15 10:30:30 +0000
commit909f82a22883e3f45ec64d8206802bbce5bad9bf (patch)
tree61293c94ee5c063a485a7c493c64d8f185d13cc0 /src/util.c
parent1049edd1d1cacb85e8b4fc9daa91a434f2372f0b (diff)
some support for ah-hoc networks
essid-based configuration git-svn-id: file:///home/lennart/svn/public/waproamd/trunk@45 022f378f-78c4-0310-b860-d162c87e6274
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index b6d4e14..caedd89 100644
--- a/src/util.c
+++ b/src/util.c
@@ -164,12 +164,13 @@ const char* escape_essid(const char *s) {
for (i = s, o = output; i-s < IW_ESSID_MAX_SIZE && *i; i++) {
- if (*i >= 32 && *i < 126 && *i != '/' && *i != '%') {
+ if (*i >= 32 && *i < 126 && *i != '/' && *i != '%')
+ *(o++) = *i;
+ else {
*(o++) = '%';
*(o++) = hextab[*i >> 4];
*(o++) = hextab[*i & 0xF];
- } else
- *(o++) = *i;
+ }
}
*(o++) = 0;