Changeset 313 in Main for trunk/Module
- Timestamp:
- Oct 14, 2024, 8:22:06 AM (5 weeks ago)
- Location:
- trunk/Module
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Module/mod_cgi.c
r215 r313 5 5 #include <cm_string.h> 6 6 7 int mod_init(struct tw_config* config, struct tw_tool* tools) {7 int MODULE_DECL mod_init(struct tw_config* config, struct tw_tool* tools) { 8 8 tools->log("CGI", "Initializing CGI module"); 9 9 tools->add_version("CGI/1.1"); … … 11 11 } 12 12 13 int mod_config(struct tw_tool* tools, char** argv, int argc) {13 int MODULE_DECL mod_config(struct tw_tool* tools, char** argv, int argc) { 14 14 if(cm_strcaseequ(argv[0], "AllowCGI")) { 15 15 return TW_CONFIG_PARSED; … … 18 18 } 19 19 20 int mod_request(struct tw_tool* tools, struct tw_http_request* req, struct tw_http_response* res) {20 int MODULE_DECL mod_request(struct tw_tool* tools, struct tw_http_request* req, struct tw_http_response* res) { 21 21 res->status = 403; 22 22 return TW_MODULE_STOP; -
trunk/Module/mod_example.c
r215 r313 4 4 #include <tw_module.h> 5 5 6 int mod_init(struct tw_config* config, struct tw_tool* tools) {6 int MODULE_DECL mod_init(struct tw_config* config, struct tw_tool* tools) { 7 7 tools->log("Example", "This is an example module"); 8 8 tools->add_version("Example/0.0"); … … 10 10 } 11 11 12 int mod_config(struct tw_tool* tools, char** argv, int argc) { return TW_CONFIG_PARSED; }12 int MODULE_DECL mod_config(struct tw_tool* tools, char** argv, int argc) { return TW_CONFIG_PARSED; } 13 13 14 int mod_request(struct tw_tool* tools, struct tw_http_request* req, struct tw_http_response* res) { return TW_MODULE_ERROR(403); }14 int MODULE_DECL mod_request(struct tw_tool* tools, struct tw_http_request* req, struct tw_http_response* res) { return TW_MODULE_ERROR(403); } -
trunk/Module/mod_proxy.c
r215 r313 5 5 #include <cm_string.h> 6 6 7 int mod_init(struct tw_config* config, struct tw_tool* tools) {7 int MODULE_DECL mod_init(struct tw_config* config, struct tw_tool* tools) { 8 8 tools->log("CGI", "Initializing Proxy module"); 9 9 tools->add_version("Proxy/1.0"); … … 11 11 } 12 12 13 int mod_config(struct tw_tool* tools, char** argv, int argc) { return TW_CONFIG_NOTME; }13 int MODULE_DECL mod_config(struct tw_tool* tools, char** argv, int argc) { return TW_CONFIG_NOTME; } 14 14 15 int mod_request(struct tw_tool* tools, struct tw_http_request* req, struct tw_http_response* res) { return TW_MODULE_PASS; }15 int MODULE_DECL mod_request(struct tw_tool* tools, struct tw_http_request* req, struct tw_http_response* res) { return TW_MODULE_PASS; }
Note:
See TracChangeset
for help on using the changeset viewer.