Hi, Organize the mod_jk2 in a way that it can be extended. Common includes are moved to jk_apache2.h (perhaps this should be renamed to the mod_jk2.h).
MT.
Index: jk_apache2.h =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_apache2.h,v retrieving revision 1.9 diff -u -r1.9 jk_apache2.h --- jk_apache2.h 31 May 2002 18:29:48 -0000 1.9 +++ jk_apache2.h 5 Jun 2002 11:54:02 -0000 @@ -62,6 +62,26 @@ * Version: $Revision: 1.9 $ */ +#ifndef JK_APACHE2_H +#define JK_APACHE2_H + +#include "apu_compat.h" +#include "ap_config.h" +#include "apr_lib.h" +#include "apr_date.h" +#include "apr_strings.h" +#include "apr_pools.h" +#include "apr_tables.h" +#include "apr_hash.h" + +#include "httpd.h" +#include "http_config.h" +#include "http_request.h" +#include "http_core.h" +#include "http_protocol.h" +#include "http_main.h" +#include "http_log.h" + #include "jk_global.h" #include "jk_map.h" #include "jk_pool.h" @@ -72,6 +92,7 @@ #include "jk_uriMap.h" #include "jk_requtil.h" +extern module AP_MODULE_DECLARE_DATA jk2_module; int JK_METHOD jk2_service_apache2_init(jk_env_t *env, jk_ws_service_t *s); @@ -85,6 +106,4 @@ jk_bean_t *result, const char *type, const char *name); - - - +#endif /* JK_APACHE2_H */ Index: jk_logger_apache2.c =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.23 diff -u -r1.23 jk_logger_apache2.c --- jk_logger_apache2.c 16 May 2002 20:55:23 -0000 1.23 +++ jk_logger_apache2.c 5 Jun 2002 11:54:04 -0000 @@ -75,15 +75,8 @@ * @author Costin Manolache */ -#include "jk_env.h" -#include "jk_map.h" -#include "jk_logger.h" -#include <stdio.h> - -#include "httpd.h" -#include "http_log.h" - #include "jk_apache2.h" +#include <stdio.h> #define HUGE_BUFFER_SIZE (8*1024) Index: jk_service_apache2.c =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c,v retrieving revision 1.24 diff -u -r1.24 jk_service_apache2.c --- jk_service_apache2.c 31 May 2002 18:29:48 -0000 1.24 +++ jk_service_apache2.c 5 Jun 2002 11:54:07 -0000 @@ -62,37 +62,13 @@ * Version: $Revision: 1.24 $ */ -#include "apu_compat.h" -#include "ap_config.h" -#include "apr_lib.h" -#include "apr_date.h" -#include "apr_strings.h" - -#include "httpd.h" -#include "http_config.h" -#include "http_request.h" -#include "http_core.h" -#include "http_protocol.h" -#include "http_main.h" -#include "http_log.h" - -#include "scoreboard.h" - -#include "util_script.h" /* * Jakarta (jk_) include files */ -#include "jk_global.h" -#include "jk_map.h" -#include "jk_pool.h" -#include "jk_env.h" -#include "jk_service.h" -#include "jk_worker.h" -#include "jk_workerEnv.h" -#include "jk_uriMap.h" -#include "jk_requtil.h" - #include "jk_apache2.h" + +#include "scoreboard.h" +#include "util_script.h" /* #define USE_APRTABLES */ Index: mod_jk2.c =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v retrieving revision 1.32 diff -u -r1.32 mod_jk2.c --- mod_jk2.c 3 Jun 2002 11:24:25 -0000 1.32 +++ mod_jk2.c 5 Jun 2002 11:54:10 -0000 @@ -65,19 +65,9 @@ /* * mod_jk: keeps all servlet/jakarta related ramblings together. */ -#include "apu_compat.h" -#include "ap_config.h" -#include "apr_lib.h" -#include "apr_date.h" -#include "apr_strings.h" - -#include "httpd.h" -#include "http_config.h" -#include "http_request.h" -#include "http_core.h" -#include "http_protocol.h" -#include "http_main.h" -#include "http_log.h" + + +#include "jk_apache2.h" #include "scoreboard.h" #include "util_script.h" @@ -86,20 +76,6 @@ static char file_name[_MAX_PATH]; #endif -/* - * Jakarta (jk_) include files - */ -#include "jk_global.h" -#include "jk_map.h" -#include "jk_pool.h" -#include "jk_env.h" -#include "jk_service.h" -#include "jk_worker.h" -#include "jk_workerEnv.h" -#include "jk_uriMap.h" -#include "jk_requtil.h" - -#include "jk_apache2.h" #define JK_HANDLER ("jakarta-servlet2") #define JK_MAGIC_TYPE ("application/x-jakarta-servlet2") @@ -156,8 +132,9 @@ int rc; rc=workerEnv->config->setPropertyString( env, workerEnv->config, (char *)name, value ); - if( rc!=JK_OK ) { - fprintf( stderr, "mod_jk2: Unrecognized option %s %s\n", name, value); + if (rc!=JK_OK) { + ap_log_perror(APLOG_MARK, APLOG_NOTICE, 0, cmd->temp_pool, + "mod_jk2: Unrecognized option %s %s\n", +name, value); } return NULL;
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>