diff --git a/src/hcid.h b/src/hcid.h
index aa563dc..5752da9 100644
--- a/src/hcid.h
+++ b/src/hcid.h
extern struct main_opts main_opts;
-gboolean plugin_init(GKeyFile *config, const char *enable,
- const char *disable);
+gboolean plugin_init(const char *enable, const char *disable);
void plugin_cleanup(void);
void rfkill_init(void);
diff --git a/src/main.c b/src/main.c
index d302ffa..7922222 100644
--- a/src/main.c
+++ b/src/main.c
static const char * const supported_options[] = {
"Name",
- "DisablePlugins",
"Class",
"DiscoverableTimeout",
"PairableTimeout",
* the plugins might wanna expose some paths on the bus. However the
* best order of how to init various subsystems of the Bluetooth
* daemon needs to be re-worked. */
- plugin_init(config, option_plugin, option_noplugin);
+ plugin_init(option_plugin, option_noplugin);
/* no need to keep parsed option in memory */
free_options();
diff --git a/src/main.conf b/src/main.conf
index 97b4519..8bb82f6 100644
--- a/src/main.conf
+++ b/src/main.conf
[General]
-# List of plugins that should not be loaded on bluetoothd startup
-#DisablePlugins = network,input
-
# Default adaper name
# %h - substituted for hostname
# %d - substituted for adapter id
diff --git a/src/plugin.c b/src/plugin.c
index 5622d7b..f231f34 100644
--- a/src/plugin.c
+++ b/src/plugin.c
return TRUE;
}
-static gboolean enable_plugin(const char *name, char **conf_disable,
- char **cli_enable, char **cli_disable)
+static gboolean enable_plugin(const char *name, char **cli_enable,
+ char **cli_disable)
{
- if (conf_disable) {
- for (; *conf_disable; conf_disable++)
- if (g_pattern_match_simple(*conf_disable, name))
- break;
- if (*conf_disable) {
- info("Excluding (conf) %s", name);
- return FALSE;
- }
- }
-
if (cli_disable) {
for (; *cli_disable; cli_disable++)
if (g_pattern_match_simple(*cli_disable, name))
#include "builtin.h"
-gboolean plugin_init(GKeyFile *config, const char *enable, const char *disable)
+gboolean plugin_init(const char *enable, const char *disable)
{
GSList *list;
GDir *dir;
const gchar *file;
- char **conf_disabled, **cli_disabled, **cli_enabled;
+ char **cli_disabled, **cli_enabled;
unsigned int i;
/* Make a call to BtIO API so its symbols got resolved before the
* plugins are loaded. */
bt_io_error_quark();
- if (config)
- conf_disabled = g_key_file_get_string_list(config, "General",
- "DisablePlugins",
- NULL, NULL);
- else
- conf_disabled = NULL;
-
if (enable)
cli_enabled = g_strsplit_set(enable, ", ", -1);
else
DBG("Loading builtin plugins");
for (i = 0; __bluetooth_builtin[i]; i++) {
- if (!enable_plugin(__bluetooth_builtin[i]->name, conf_disabled,
- cli_enabled, cli_disabled))
+ if (!enable_plugin(__bluetooth_builtin[i]->name, cli_enabled,
+ cli_disabled))
continue;
add_plugin(NULL, __bluetooth_builtin[i]);
continue;
}
- if (!enable_plugin(desc->name, conf_disabled,
- cli_enabled, cli_disabled)) {
+ if (!enable_plugin(desc->name, cli_enabled, cli_disabled)) {
dlclose(handle);
continue;
}
plugin->active = TRUE;
}
- g_strfreev(conf_disabled);
g_strfreev(cli_enabled);
g_strfreev(cli_disabled);