Misc plugin work

* Fix crash when unloading plugins.
* Fixed plugin loader and plugin unload handler.
* Added a new example plugin: mod_logging which logs users logging in and out of the hub to stdout.
This commit is contained in:
Jan Vidar Krey
2010-06-22 16:04:33 +02:00
parent ccaa4860b4
commit aa26052479
11 changed files with 265 additions and 29 deletions

View File

@@ -826,6 +826,11 @@ void hub_plugins_load(struct hub_info* hub)
void hub_plugins_unload(struct hub_info* hub)
{
if (!hub->plugins || !hub->plugins->loaded)
{
return;
}
struct uhub_plugin_handle* plugin = (struct uhub_plugin_handle*) list_get_first(hub->plugins->loaded);
while (plugin)
{