diff --git a/dist/antd-1.0.4b.tar.gz b/dist/antd-1.0.4b.tar.gz index 58deb3c..8001b8e 100644 Binary files a/dist/antd-1.0.4b.tar.gz and b/dist/antd-1.0.4b.tar.gz differ diff --git a/lib/handle.c b/lib/handle.c index d19d042..fe12b3c 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -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) diff --git a/lib/handle.h b/lib/handle.h index 1e1408c..9137934 100644 --- a/lib/handle.h +++ b/lib/handle.h @@ -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); diff --git a/plugin_manager.c b/plugin_manager.c index 8215229..141dda2 100644 --- a/plugin_manager.c +++ b/plugin_manager.c @@ -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