summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeng Huang <shawn.p.huang@gmail.com>2009-03-30 14:13:30 +0800
committerPeng Huang <shawn.p.huang@gmail.com>2009-03-30 14:13:30 +0800
commit81963e23e2688f28ef0acbdbf72d831be097bd62 (patch)
tree3af3c2d9d05ded9f5b0db944439c423370937be3 /src
parent15e6b996bc63dcc6cf97802ce1905d2aa582144c (diff)
downloadibus-81963e23e2688f28ef0acbdbf72d831be097bd62.tar.gz
ibus-81963e23e2688f28ef0acbdbf72d831be097bd62.tar.xz
ibus-81963e23e2688f28ef0acbdbf72d831be097bd62.zip
Use "unix" as hostname if hostname is empty.
Diffstat (limited to 'src')
-rw-r--r--src/ibusshare.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ibusshare.c b/src/ibusshare.c
index 510b2be..f87bb0c 100644
--- a/src/ibusshare.c
+++ b/src/ibusshare.c
@@ -97,6 +97,9 @@ ibus_get_socket_path (void)
username = ibus_get_user_name ();
+ if (hostname[0] == '\0')
+ hostname = "unix";
+
path = g_strdup_printf (
"/tmp/ibus-%s/ibus-%s-%s",
username, hostname, displaynumber);