parent
aca9d45adf
commit
eea7cd3c2f
|
@ -9,6 +9,9 @@ typedef struct server server;
|
|||
struct connection;
|
||||
typedef struct connection connection;
|
||||
|
||||
struct plugin;
|
||||
typedef struct plugin plugin;
|
||||
|
||||
struct request_st;
|
||||
typedef struct request_st request_st;
|
||||
|
||||
|
|
|
@ -435,7 +435,7 @@ handler_t plugins_call_init(server *srv) {
|
|||
return HANDLER_ERROR;
|
||||
}
|
||||
|
||||
/* used for con->mode, DIRECT == 0, plugins above that */
|
||||
((plugin_data_base *)(p->data))->self = p;
|
||||
((plugin_data_base *)(p->data))->id = i + 1;
|
||||
|
||||
if (p->version != LIGHTTPD_VERSION_ID) {
|
||||
|
|
|
@ -49,13 +49,14 @@ extern array plugin_stats;
|
|||
|
||||
#define PLUGIN_DATA int id; \
|
||||
int nconfig; \
|
||||
config_plugin_value_t *cvlist
|
||||
config_plugin_value_t *cvlist; \
|
||||
struct plugin *self
|
||||
|
||||
typedef struct {
|
||||
PLUGIN_DATA;
|
||||
} plugin_data_base;
|
||||
|
||||
typedef struct {
|
||||
struct plugin {
|
||||
void *data;
|
||||
/* is called ... */
|
||||
handler_t (* handle_uri_raw) (connection *con, void *p_d); /* after uri_raw is set */
|
||||
|
@ -85,7 +86,7 @@ typedef struct {
|
|||
const char *name;/* name of the plugin */
|
||||
size_t version;
|
||||
void *lib; /* dlopen handle */
|
||||
} plugin;
|
||||
};
|
||||
|
||||
__attribute_cold__
|
||||
int plugins_load(server *srv);
|
||||
|
|
Loading…
Reference in New Issue