diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-05-01 17:17:19 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-05-01 17:17:19 +0000 |
commit | 5ebe419ded6f81cc67886f8e9df10aa428968f19 (patch) | |
tree | da5c306403185e20c72e961131fe477be06547c8 /navit/plugin.c | |
parent | 3c32eec502c406bd0daf4f40b821d8b87de246b2 (diff) | |
download | navit-5ebe419ded6f81cc67886f8e9df10aa428968f19.tar.gz |
Fix:core:Warn if no plugins are found, improve other warnings & debug output; see #1030
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5064 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/plugin.c')
-rw-r--r-- | navit/plugin.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/navit/plugin.c b/navit/plugin.c index 782917233..9ab56b4bc 100644 --- a/navit/plugin.c +++ b/navit/plugin.c @@ -183,6 +183,7 @@ plugin_load(struct plugin *pl) g_module_close(mod); return 0; } else { + dbg(1, "loaded module %s\n", pl->name); pl->mod=mod; pl->init=init; } @@ -298,11 +299,11 @@ plugin_new(struct attr *parent, struct attr **attrs) { if (count != 1 || file_exists(array[0])) { for (i = 0 ; i < count ; i++) { name=array[i]; - dbg(2,"name[%d]='%s'\n", i, name); + dbg(2,"found plugin module file [%d]: '%s'\n", i, name); if (! (pls && (pl=g_hash_table_lookup(pls->hash, name)))) { pl=plugin_new_from_path(name); if (! pl) { - dbg(0,"failed to create plugin '%s'\n", name); + dbg(0,"failed to create plugin from file '%s'\n", name); continue; } if (pls) { @@ -341,16 +342,20 @@ plugins_init(struct plugins *pls) GList *l; l=pls->list; - while (l) { - pl=l->data; - if (! plugin_get_ondemand(pl)) { - if (plugin_get_active(pl)) - if (!plugin_load(pl)) - plugin_set_active(pl, 0); - if (plugin_get_active(pl)) - plugin_call_init(pl); + if (l){ + while (l) { + pl=l->data; + if (! plugin_get_ondemand(pl)) { + if (plugin_get_active(pl)) + if (!plugin_load(pl)) + plugin_set_active(pl, 0); + if (plugin_get_active(pl)) + plugin_call_init(pl); + } + l=g_list_next(l); } - l=g_list_next(l); + } else { + dbg(0, "Warning: No plugins found. Is Navit installed correctly?\n"); } #endif } |