diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-07-11 00:51:28 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-07-11 00:51:28 +0200 |
commit | 9014a8bd7a88aa4794b730e7fccf7838a00ad351 (patch) | |
tree | e248029fa587491b203c8a3dd0b2340ce2841cf8 /src/dbus.c | |
parent | c6c18be35bb1d300d0b62a568783cc1c477f7151 (diff) |
dbus: suppress duplicate message when reusing bus for system and session
Diffstat (limited to 'src/dbus.c')
-rw-r--r-- | src/dbus.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/dbus.c b/src/dbus.c index 7f8b6a05d5..0b93db55de 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -758,7 +758,6 @@ static void bus_new_connection( static int bus_init_system(Manager *m) { DBusError error; - char *id; int r; assert(m); @@ -800,10 +799,13 @@ static int bus_init_system(Manager *m) { goto fail; } - log_info("Successfully connected to system D-Bus bus %s as %s", - strnull((id = dbus_connection_get_server_id(m->system_bus))), - strnull(dbus_bus_get_unique_name(m->system_bus))); - dbus_free(id); + if (m->api_bus != m->system_bus) { + char *id; + log_info("Successfully connected to system D-Bus bus %s as %s", + strnull((id = dbus_connection_get_server_id(m->system_bus))), + strnull(dbus_bus_get_unique_name(m->system_bus))); + dbus_free(id); + } return 0; @@ -816,7 +818,6 @@ fail: static int bus_init_api(Manager *m) { DBusError error; - char *id; int r; assert(m); @@ -884,10 +885,13 @@ static int bus_init_api(Manager *m) { if ((r = query_name_list(m)) < 0) goto fail; - log_info("Successfully connected to API D-Bus bus %s as %s", - strnull((id = dbus_connection_get_server_id(m->api_bus))), - strnull(dbus_bus_get_unique_name(m->api_bus))); - dbus_free(id); + if (m->api_bus != m->system_bus) { + char *id; + log_info("Successfully connected to API D-Bus bus %s as %s", + strnull((id = dbus_connection_get_server_id(m->api_bus))), + strnull(dbus_bus_get_unique_name(m->api_bus))); + dbus_free(id); + } return 0; |