Diff for /parser3/src/targets/apache/mod_parser3.c between versions 1.8 and 1.12

version 1.8, 2010/11/23 00:00:32 version 1.12, 2012/03/16 09:24:15
Line 1 Line 1
 /** @file  /** @file
         Parser: apache 1.3 and 2.2 module          Parser: apache 1.3 and 2.2 module
   
         Copyright (c) 2001-2010 ArtLebedev Group (http://www.artlebedev.com)          Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com)
         Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)          Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
 */  */
   
 static const char * const IDENT_MOD_PARSER3_C="$Date$";  
   
 #ifdef WIN32  #ifdef WIN32
 #include <winsock2.h>  #include <winsock2.h>
 #endif  #endif
Line 21  static const char * const IDENT_MOD_PARS Line 19  static const char * const IDENT_MOD_PARS
   
 #include "pa_httpd.h"  #include "pa_httpd.h"
   
   volatile const char * IDENT_MOD_PARSER3_C="$Id$" IDENT_PA_HTTPD_H;
   
 #define PARSER3_HANDLER "parser3-handler"  #define PARSER3_HANDLER "parser3-handler"
   
 /*  /*
Line 65  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 108  static int parser_handler(request_rec *r Line 108  static int parser_handler(request_rec *r
 */  */
   
 #ifdef STANDARD20_MODULE_STUFF  #ifdef STANDARD20_MODULE_STUFF
 static void parser_module_init(apr_pool_t *p, server_rec *s) {  static void parser_child_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) {
 #endif    #endif  
Line 146  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", (const char *(*)())cmd_parser_config, 0, OR_OPTIONS, TAKE1, "Parser config filespec"},
                 "ParserConfig",                         /* directive name */  
                         (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}          {NULL}
 };  };
   
Line 181  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_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_child_init, NULL, NULL, APR_HOOK_MIDDLE);
 };  };
   
 module AP_MODULE_DECLARE_DATA parser3_module =  module AP_MODULE_DECLARE_DATA parser3_module =
Line 238  void pa_ap_log_rerror(const char *file, Line 230  void pa_ap_log_rerror(const char *file,
   
         ap_log_rerror(file, line, level,          ap_log_rerror(file, line, level,
 #ifdef STANDARD20_MODULE_STUFF  #ifdef STANDARD20_MODULE_STUFF
                                 0,                          0,
 #endif  #endif
                       (request_rec*)s->real_request_rec, "%s", str);                          (request_rec*)s->real_request_rec, "%s", str);
 }  }
   
   
Line 253  void pa_ap_log_error(const char *file, i Line 245  void pa_ap_log_error(const char *file, i
   
         ap_log_error(file, line, level,          ap_log_error(file, line, level,
 #ifdef STANDARD20_MODULE_STUFF  #ifdef STANDARD20_MODULE_STUFF
                                 0,                          0,
 #endif  #endif
                       (server_rec*)s, "%s", str);                          (server_rec*)s, "%s", str);
 }  }
   
 // ap_alloc.h  // ap_alloc.h
Line 307  int pa_ap_rwrite(const void *buf, int nb Line 299  int pa_ap_rwrite(const void *buf, int nb
 void pa_ap_hard_timeout(const 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((char *)s, (request_rec*)r->real_request_rec);
 #endif  #endif
 }  }
 void pa_ap_reset_timeout(pa_request_rec *r) {  void pa_ap_reset_timeout(pa_request_rec *r) {

Removed from v.1.8  
changed lines
  Added in v.1.12


E-mail: