mirror of
https://github.com/lxsang/ant-http
synced 2024-12-25 16:28:21 +01:00
alow a plugin to require other plugin
This commit is contained in:
parent
876f60c9a2
commit
cb98562585
BIN
dist/antd-1.0.4b.tar.gz
vendored
BIN
dist/antd-1.0.4b.tar.gz
vendored
Binary file not shown.
@ -70,6 +70,12 @@ static const char* S_511 = "Network Authentication Required";
|
||||
static const char* S_UNOF = "Unofficial Status";
|
||||
|
||||
|
||||
int require_plugin(const char* name)
|
||||
{
|
||||
UNUSED(name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* get_status_str(int stat)
|
||||
{
|
||||
switch(stat)
|
||||
|
@ -101,6 +101,10 @@ typedef struct {
|
||||
int raw_body;
|
||||
} plugin_header_t;
|
||||
|
||||
|
||||
int __attribute__((weak)) require_plugin(const char*);
|
||||
|
||||
|
||||
void set_nonblock(int socket);
|
||||
//void set_block(int socket);
|
||||
|
||||
|
@ -18,6 +18,12 @@ struct plugin_entry *plugin_lookup(char *s)
|
||||
return NULL; /* not found */
|
||||
}
|
||||
|
||||
int require_plugin(const char* name)
|
||||
{
|
||||
struct plugin_entry* ptr = plugin_load((char*)name);
|
||||
return ptr != NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load a plugin to the plugin table
|
||||
* Only load when not available in the plugin table
|
||||
|
Loading…
Reference in New Issue
Block a user