summaryrefslogtreecommitdiff
path: root/src/profile.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-05-15 13:22:51 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2023-05-15 13:22:51 -0700
commit67c5824fd071a758756bbb96f167a0d18c4c8520 (patch)
treed890355342a3feaf07ff8a27d9da8cc5dbe57864 /src/profile.c
parentf3977023f93d1ccfe301ed18a8b7aa866a52ebd2 (diff)
downloadbluez-67c5824fd071a758756bbb96f167a0d18c4c8520.tar.gz
profile: Add support for experimental flag
This adds experimental field to btd_profile so the plugin can indicate drivers that depends on experimental to be enabled.
Diffstat (limited to 'src/profile.c')
-rw-r--r--src/profile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/profile.c b/src/profile.c
index e1bebf1ee..ea188f36b 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -775,6 +775,12 @@ static struct btd_profile *btd_profile_find_uuid(const char *uuid)
int btd_profile_register(struct btd_profile *profile)
{
+ if (profile->experimental && !(g_dbus_get_flags() &
+ G_DBUS_FLAG_ENABLE_EXPERIMENTAL)) {
+ DBG("D-Bus experimental not enabled");
+ return -ENOTSUP;
+ }
+
profiles = g_slist_append(profiles, profile);
return 0;
}