summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-07-19 11:57:28 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-07-19 11:57:28 +0000
commit88641040aaa501ee6a3d6f78e33db8efd1940acb (patch)
treed6d479e2b4f24f876d08a353d5866a03014b884c /hcid
parentb98c93ed852d29557fe71de5262357b704f85592 (diff)
Allow storing of all UTF-8 remote device names (the same fix was already
done for local names).
Diffstat (limited to 'hcid')
-rw-r--r--hcid/storage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hcid/storage.c b/hcid/storage.c
index 473c69de..0a14255c 100644
--- a/hcid/storage.c
+++ b/hcid/storage.c
@@ -231,10 +231,10 @@ int write_device_name(bdaddr_t *local, bdaddr_t *peer, char *name)
memset(str, 0, sizeof(str));
for (i = 0; i < 248 && name[i]; i++)
- if (isprint(name[i]))
- str[i] = name[i];
- else
+ if (name[i] < 32 || name[i] == 127)
str[i] = '.';
+ else
+ str[i] = name[i];
ba2str(local, addr);
snprintf(filename, PATH_MAX, "%s/%s/names", STORAGEDIR, addr);