|
|
| version 1.6, 2010/11/22 23:24:58 | version 1.9, 2010/11/23 00:07:33 |
|---|---|
| Line 45 static const char * const IDENT_MOD_PARS | Line 45 static const char * const IDENT_MOD_PARS |
| #define apr_pool_t pool | #define apr_pool_t pool |
| #define apr_table_t table | #define apr_table_t table |
| #define ap_add_version_component(p, v) ap_add_version_component(v) | |
| #endif /* STANDARD20_MODULE_STUFF */ | #endif /* STANDARD20_MODULE_STUFF */ |
| /* | /* |
| Line 67 static Parser_module_config *our_dconfig | Line 65 static Parser_module_config *our_dconfig |
| return (Parser_module_config *) ap_get_module_config(r->per_dir_config, &parser3_module); | return (Parser_module_config *) ap_get_module_config(r->per_dir_config, &parser3_module); |
| } | } |
| static const char* cmd_parser_config(cmd_parms *cmd, void *mconfig, char *file_spec) { | static const char* cmd_parser_config(cmd_parms *cmd, void *mconfig, const char *file_spec) { |
| Parser_module_config *cfg = (Parser_module_config *) mconfig; | Parser_module_config *cfg = (Parser_module_config *) mconfig; |
| cfg->parser_config_filespec=file_spec; | cfg->parser_config_filespec=file_spec; |
| return NULL; | return NULL; |
| Line 113 static int parser_handler(request_rec *r | Line 111 static int parser_handler(request_rec *r |
| static void parser_module_init(apr_pool_t *p, server_rec *s) { | static void parser_module_init(apr_pool_t *p, server_rec *s) { |
| #else | #else |
| static void parser_module_init(server_rec *s, apr_pool_t *p) { | static void parser_module_init(server_rec *s, apr_pool_t *p) { |
| ap_add_version_component(p, pa_version()); | |
| #endif | #endif |
| ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, p, "parser inited %d", getpid()); | ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, p, "parser inited %d", getpid()); |
| pa_setup_module_cells(); | pa_setup_module_cells(); |
| Line 149 static void *parser_create_server_config | Line 146 static void *parser_create_server_config |
| */ | */ |
| static const command_rec parser_cmds[] = | static const command_rec parser_cmds[] = |
| { | { |
| { | { "ParserConfig", (cmd_func)cmd_parser_config, 0, OR_OPTIONS, TAKE1, "Parser config filespec" }, |
| "ParserConfig", /* directive name */ | { NULL } |
| (const char* (*)(void))((void *)cmd_parser_config), // config action routine | |
| (void*)0, /* argument to include in call */ | |
| (int)(OR_OPTIONS), /* where available */ | |
| TAKE1, /* arguments */ | |
| "Parser config filespec" // directive description | |
| }, | |
| {NULL} | |
| }; | }; |
| /*--------------------------------------------------------------------------*/ | /*--------------------------------------------------------------------------*/ |
| Line 184 static const handler_rec parser_handlers | Line 174 static const handler_rec parser_handlers |
| */ | */ |
| static void parser_register_hooks(apr_pool_t* pool) | static void parser_register_hooks(apr_pool_t* pool) |
| { | { |
| // ap_add_version_component(pool, pa_version()); | |
| // ap_hook_post_config(parser_server_init, NULL, NULL, APR_HOOK_MIDDLE); | // ap_hook_post_config(parser_server_init, NULL, NULL, APR_HOOK_MIDDLE); |
| ap_hook_handler(parser_handler, NULL, NULL, APR_HOOK_MIDDLE); | ap_hook_handler(parser_handler, NULL, NULL, APR_HOOK_MIDDLE); |
| ap_hook_child_init(parser_module_init, NULL, NULL, APR_HOOK_MIDDLE); | ap_hook_child_init(parser_module_init, NULL, NULL, APR_HOOK_MIDDLE); |
| Line 233 module MODULE_VAR_EXPORT parser3_module | Line 222 module MODULE_VAR_EXPORT parser3_module |
| // interface to C++ | // interface to C++ |
| #define PA_APLOG_EMERG 0 /* system is unusable */ | |
| #define PA_APLOG_ALERT 1 /* action must be taken immediately */ | |
| #define PA_APLOG_CRIT 2 /* critical conditions */ | |
| #define PA_APLOG_ERR 3 /* error conditions */ | |
| #define PA_APLOG_WARNING 4 /* warning conditions */ | |
| #define PA_APLOG_NOTICE 5 /* normal but significant condition */ | |
| #define PA_APLOG_INFO 6 /* informational */ | |
| #define PA_APLOG_DEBUG 7 /* debug-level messages */ | |
| #define PA_APLOG_LEVELMASK 7 /* mask off the level value */ | |
| #define PA_APLOG_NOERRNO (PA_APLOG_LEVELMASK + 1) | |
| #define PA_APLOG_MARK __FILE__,__LINE__ | |
| void pa_ap_log_rerror(const char *file, int line, int level, const pa_request_rec *s, const char *fmt, ...) { | void pa_ap_log_rerror(const char *file, int line, int level, const pa_request_rec *s, const char *fmt, ...) { |
| const char* str; | const char* str; |
| va_list l; | va_list l; |
| Line 323 int pa_ap_rwrite(const void *buf, int nb | Line 297 int pa_ap_rwrite(const void *buf, int nb |
| // http_main.h | // http_main.h |
| void pa_ap_hard_timeout(char *s, pa_request_rec *r) { | void pa_ap_hard_timeout(const char *s, pa_request_rec *r) { |
| // Apache 2 uses non-blocking I/O | // Apache 2 uses non-blocking I/O |
| #ifndef STANDARD20_MODULE_STUFF | #ifndef STANDARD20_MODULE_STUFF |
| ap_hard_timeout(s, (request_rec*)r->real_request_rec); | ap_hard_timeout(s, (request_rec*)r->real_request_rec); |