summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2012-04-27 11:27:03 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2012-04-27 11:27:03 +0900
commitd0df8d3a62fd156029fb1422cd786d3f351b17fe (patch)
treed8a189322c20da450097d0055bd5ced30b13fc99
parentb8fe4d782db37385246f651493f9d935dd58c301 (diff)
downloadibus-d0df8d3a62fd156029fb1422cd786d3f351b17fe.tar.gz
Enable to fall back /etc/machine-id
http://cgit.freedesktop.org/dbus/dbus/commit/dbus/dbus-sysdeps-unix.c?id=66e52541d5bdd4927a5c702963749760643313f4 BUG=http://code.google.com/p/ibus/issues/detail?id=1389 TEST=Linux desktop Review URL: https://codereview.appspot.com/6111060
-rw-r--r--src/ibusshare.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ibusshare.c b/src/ibusshare.c
index 95f98d34..ce332ba5 100644
--- a/src/ibusshare.c
+++ b/src/ibusshare.c
@@ -44,7 +44,11 @@ ibus_get_local_machine_id (void)
if (!g_file_get_contents ("/var/lib/dbus/machine-id",
&machine_id,
NULL,
- &error)) {
+ &error) &&
+ !g_file_get_contents ("/etc/machine-id",
+ &machine_id,
+ NULL,
+ NULL)) {
g_warning ("Unable to load /var/lib/dbus/machine-id: %s", error->message);
g_error_free (error);
machine_id = "machine-id";