diff options
author | Simon McVittie <smcv@collabora.com> | 2017-07-21 20:51:53 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2017-12-12 16:22:34 +0000 |
commit | 7743c98b4b00d478849700e3b01d42a617b2f161 (patch) | |
tree | 49ab5fa03412388717e453c79d87eacf7da72dba /bus/containers.c | |
parent | 1de35ba8eea111723ccb0d8c996c8abe7fa5a00d (diff) | |
download | dbus-7743c98b4b00d478849700e3b01d42a617b2f161.tar.gz |
bus/containers: Indicate in loginfo whether connection is contained
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101354
Diffstat (limited to 'bus/containers.c')
-rw-r--r-- | bus/containers.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bus/containers.c b/bus/containers.c index aea9f78b..8f1f71ff 100644 --- a/bus/containers.c +++ b/bus/containers.c @@ -1091,3 +1091,32 @@ bus_containers_remove_connection (BusContainers *self, dbus_connection_unref (connection); #endif /* DBUS_ENABLE_CONTAINERS */ } + +dbus_bool_t +bus_containers_connection_is_contained (DBusConnection *connection, + const char **path, + const char **type, + const char **name) +{ +#ifdef DBUS_ENABLE_CONTAINERS + BusContainerInstance *instance; + + instance = dbus_connection_get_data (connection, contained_data_slot); + + if (instance != NULL) + { + if (path != NULL) + *path = instance->path; + + if (type != NULL) + *type = instance->type; + + if (name != NULL) + *name = instance->name; + + return TRUE; + } +#endif /* DBUS_ENABLE_CONTAINERS */ + + return FALSE; +} |