mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-27 06:33:21 -05:00
Remove alternate plugin load paths
This commit is contained in:
parent
3ec2cc0f00
commit
9d026442b2
39
src/main.c
39
src/main.c
@ -398,7 +398,6 @@ int main(int argc, char *argv[]) {
|
|||||||
char *apppath;
|
char *apppath;
|
||||||
|
|
||||||
int debuglevel=0;
|
int debuglevel=0;
|
||||||
int plugins_loaded = 0;
|
|
||||||
|
|
||||||
err_setlevel(2);
|
err_setlevel(2);
|
||||||
|
|
||||||
@ -527,37 +526,21 @@ int main(int argc, char *argv[]) {
|
|||||||
/* load plugins before we drop privs? Maybe... let the
|
/* load plugins before we drop privs? Maybe... let the
|
||||||
* plugins do stuff they might need to */
|
* plugins do stuff they might need to */
|
||||||
plugin_init();
|
plugin_init();
|
||||||
if((plugindir=conf_alloc_string("plugins","plugin_dir",NULL)) != NULL) {
|
|
||||||
|
plugindir = conf_alloc_string("plugins", "plugin_dir", NULL);
|
||||||
|
if (plugindir)
|
||||||
|
{
|
||||||
/* instead of specifying plugins, let's walk through the directory
|
/* instead of specifying plugins, let's walk through the directory
|
||||||
* and load each of them */
|
* and load each of them */
|
||||||
if(!load_plugin_dir(plugindir)) {
|
if (!load_plugin_dir(plugindir))
|
||||||
DPRINTF(E_LOG,L_MAIN,"Warning: Could not load plugins\n");
|
DPRINTF(E_LOG, L_MAIN, "Warning: Could not load plugins\n");
|
||||||
} else {
|
|
||||||
plugins_loaded = TRUE;
|
|
||||||
}
|
|
||||||
free(plugindir);
|
free(plugindir);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!plugins_loaded) {
|
phandle = NULL;
|
||||||
if((!load_plugin_dir("/usr/lib/firefly/plugins")) &&
|
while ((phandle = plugin_enum(phandle)))
|
||||||
(!load_plugin_dir("/usr/lib/mt-daapd/plugins")) &&
|
DPRINTF(E_LOG, L_MAIN, "Plugin loaded: %s\n", plugin_get_description(phandle));
|
||||||
(!load_plugin_dir("/lib/mt-daapd/plugins")) &&
|
|
||||||
(!load_plugin_dir("/lib/mt-daapd/plugins")) &&
|
|
||||||
(!load_plugin_dir("/usr/local/lib/mt-daapd/plugins")) &&
|
|
||||||
(!load_plugin_dir("/usr/local/lib/mt-daapd/plugins")) &&
|
|
||||||
(!load_plugin_dir("/opt/share/firefly/plugins")) &&
|
|
||||||
(!load_plugin_dir("/opt/share/mt-daapd/plugins")) &&
|
|
||||||
(!load_plugin_dir("/opt/lib/firefly/plugins")) &&
|
|
||||||
(!load_plugin_dir("/opt/lib/mt-daapd/plugins")) &&
|
|
||||||
(!load_plugin_dir("plugins/.libs"))) {
|
|
||||||
DPRINTF(E_FATAL,L_MAIN,"plugins/plugin_dir not specified\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
phandle=NULL;
|
|
||||||
while((phandle=plugin_enum(phandle))) {
|
|
||||||
DPRINTF(E_LOG,L_MAIN,"Plugin loaded: %s\n",plugin_get_description(phandle));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Block signals for all threads except the main one */
|
/* Block signals for all threads except the main one */
|
||||||
sigemptyset(&sigs);
|
sigemptyset(&sigs);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user