module-rtkit: don't use dbus when disabled

This commit is contained in:
Wim Taymans 2021-02-12 18:10:40 +01:00
parent 70390a631e
commit 9074bfc23a

View file

@ -546,6 +546,8 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
struct spa_system *system;
const struct spa_support *support;
uint32_t n_support;
const struct pw_properties *props;
const char *str;
int res;
support = pw_context_get_support(context, &n_support);
@ -558,6 +560,11 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
if (system == NULL)
return -ENOTSUP;
if ((props = pw_context_get_properties(context)) != NULL &&
(str = pw_properties_get(props, "support.dbus")) != NULL &&
!pw_properties_parse_bool(str))
return -ENOTSUP;
impl = calloc(1, sizeof(struct impl));
if (impl == NULL)
return -ENOMEM;