diff options
author | Krzysztof Krzyżaniak <eloy@debian.org> | 2006-01-16 19:08:37 +0000 |
---|---|---|
committer | Krzysztof Krzyżaniak <eloy@debian.org> | 2006-01-16 19:08:37 +0000 |
commit | f40f3dcc4b1cbbbd3bcf640e6d852786bd546d12 (patch) | |
tree | f6c6501b996665c51a3504bf5327b2753d3e048c /src/plugin.c | |
parent | ae6e5f21be48a40bc2a29518dc655245408cf972 (diff) | |
download | lighttpd-f40f3dcc4b1cbbbd3bcf640e6d852786bd546d12.tar.gz |
eloy: new upstream versiondebian/1.4.9-1
Diffstat (limited to 'src/plugin.c')
-rw-r--r-- | src/plugin.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/plugin.c b/src/plugin.c index b375017..e74d8b0 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -66,6 +66,7 @@ static void plugin_free(plugin *p) { /*if (RUNNING_ON_VALGRIND) use_dlclose = 0;*/ #endif +#ifndef LIGHTTPD_STATIC if (use_dlclose && p->lib) { #ifdef __WIN32 FreeLibrary(p->lib); @@ -73,6 +74,7 @@ static void plugin_free(plugin *p) { dlclose(p->lib); #endif } +#endif free(p); } @@ -100,7 +102,23 @@ static int plugins_register(server *srv, plugin *p) { * */ +#ifdef LIGHTTPD_STATIC +int plugins_load(server *srv) { + plugin *p; +#define PLUGIN_INIT(x)\ + p = plugin_init(); \ + if (x ## _plugin_init(p)) { \ + log_error_write(srv, __FILE__, __LINE__, "ss", #x, "plugin init failed" ); \ + plugin_free(p); \ + return -1;\ + }\ + plugins_register(srv, p); + +#include "plugin-static.h" + return 0; +} +#else int plugins_load(server *srv) { plugin *p; int (*init)(plugin *pl); @@ -205,6 +223,7 @@ int plugins_load(server *srv) { return 0; } +#endif #define PLUGIN_TO_SLOT(x, y) \ handler_t plugins_call_##y(server *srv, connection *con) {\ |