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

@@ -146,6 +146,7 @@ libuhub_SOURCES := \
src/core/route.c \
src/core/user.c \
src/core/usermanager.c \
src/core/plugininvoke.c \
src/core/pluginloader.c \
src/network/backend.c \
src/network/connection.c \
@@ -195,6 +196,9 @@ autotest_OBJECTS = autotest.o
plugin_example_SOURCES := src/plugins/mod_example.c
plugin_example_TARGET := $(plugin_example_SOURCES:.c=.so)
plugin_logging_SOURCES := src/plugins/mod_logging.c
plugin_logging_TARGET := $(plugin_example_SOURCES:.c=.so)
# Source to objects
libuhub_OBJECTS := $(libuhub_SOURCES:.c=.o)
@@ -206,7 +210,7 @@ adcrush_OBJECTS := $(adcrush_SOURCES:.c=.o)
admin_OBJECTS := $(admin_SOURCES:.c=.o)
all_OBJECTS := $(libuhub_OBJECTS) $(uhub_OBJECTS) $(adcrush_OBJECTS) $(autotest_OBJECTS) $(admin_OBJECTS) $(libadc_common_OBJECTS) $(libadc_client_OBJECTS)
all_plugins := $(plugin_example_TARGET)
all_plugins := $(plugin_example_TARGET) $(plugin_logging_TARGET)
uhub_BINARY=uhub$(BIN_EXT)
adcrush_BINARY=adcrush$(BIN_EXT)