diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-04-24 20:23:07 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-04-24 20:23:07 +0000 |
commit | 4e2d82b18f7e099cbce933b383c45efa40306161 (patch) | |
tree | 59f6dac0e0a77bee42af778df254f379aec6f369 /server.c | |
parent | 4ccd2cdd5ae567dc2cb6c05ca5e5a9537a9dc1c4 (diff) |
add support for dots and backslashes in domain names (required for DNS-SD)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@28 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -300,10 +300,9 @@ flxServer *flx_server_new(GMainContext *c) { /* Get host name */ hn = flx_get_host_name(); - if ((e = strchr(hn, '.'))) - *e = 0; + hn[strcspn(hn, ".")] = 0; - s->hostname = g_strdup_printf("%s.local.", hn); + s->hostname = g_strdup_printf("%slocal.", hn); g_free(hn); add_default_entries(s); |