cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c
mturk 2002/07/08 05:13:51 Modified:jk/native2/server/apache2 jk_logger_apache2.c Log: Change the JK_LOG_INFO to be logged as [notice] instead of [warning]. This is much more intuitive for the context we are logging. Revision ChangesPath 1.27 +1 -1 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- jk_logger_apache2.c 12 Jun 2002 12:42:25 - 1.26 +++ jk_logger_apache2.c 8 Jul 2002 12:13:51 - 1.27 @@ -136,7 +136,7 @@ if( level == JK_LOG_DEBUG_LEVEL ) { ap_log_error( file, line, APLOG_DEBUG | APLOG_NOERRNO, 0, s, buf); } else if( level == JK_LOG_INFO_LEVEL ) { -ap_log_error( file, line, APLOG_WARNING | APLOG_NOERRNO, 0, s, buf); +ap_log_error( file, line, APLOG_NOTICE | APLOG_NOERRNO, 0, s, buf); } else { ap_log_error( file, line, APLOG_ERR | APLOG_NOERRNO, 0, s, buf); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c
jfclere 2002/06/12 05:42:25 Modified:jk/native2/server/apache2 jk_logger_apache2.c Log: Allow to switch on the trace of env. Revision ChangesPath 1.26 +2 -1 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- jk_logger_apache2.c 7 Jun 2002 23:45:30 - 1.25 +++ jk_logger_apache2.c 12 Jun 2002 12:42:25 - 1.26 @@ -170,7 +170,8 @@ if( strcmp( name, level )==0 ) { _this-level = jk2_logger_file_parseLogLevel(env, value); -if( _this-level == 0 ) { +if( _this-level == JK_LOG_DEBUG_LEVEL ) { +env-debug = 1; /* _this-jkLog( env, _this, JK_LOG_ERROR, */ /* Level %s %d \n, value, _this-level ); */ } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c
costin 02/05/16 13:55:23 Modified:jk/native2/server/apache2 jk_logger_apache2.c Log: Remove another log statement. Revision ChangesPath 1.23 +2 -2 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- jk_logger_apache2.c 14 May 2002 20:44:21 - 1.22 +++ jk_logger_apache2.c 16 May 2002 20:55:23 - 1.23 @@ -188,8 +188,8 @@ if( strcmp( name, level )==0 ) { _this-level = jk2_logger_file_parseLogLevel(env, value); if( _this-level == 0 ) { -_this-jkLog( env, _this, JK_LOG_ERROR, - Level %s %d \n, value, _this-level ); +/* _this-jkLog( env, _this, JK_LOG_ERROR, */ +/* Level %s %d \n, value, _this-level ); */ } return JK_OK; } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c mod_jk2.c
costin 02/05/03 10:49:53 Modified:jk/native2/server/apache2 jk_logger_apache2.c mod_jk2.c Log: More updates, return the correct result from setProperty ( or an message will be displayed ) Revision ChangesPath 1.21 +2 -0 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- jk_logger_apache2.c 25 Apr 2002 19:25:11 - 1.20 +++ jk_logger_apache2.c 3 May 2002 17:49:53 - 1.21 @@ -191,7 +191,9 @@ _this-jkLog( env, _this, JK_LOG_ERROR, Level %s %d \n, value, _this-level ); } +return JK_OK; } +return JK_ERR; } 1.15 +2 -2 jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c Index: mod_jk2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- mod_jk2.c 30 Apr 2002 06:53:34 - 1.14 +++ mod_jk2.c 3 May 2002 17:49:53 - 1.15 @@ -59,7 +59,7 @@ * Description: Apache 2 plugin for Jakarta/Tomcat * * Author: Gal Shachor [EMAIL PROTECTED] * * Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.14 $ * + * Version: $Revision: 1.15 $ * ***/ /* @@ -553,7 +553,7 @@ be shared with other server adapters */ rPool= worker-rPoolCache-get( env, worker-rPoolCache ); if( rPool == NULL ) { -rPool=worker-pool-create( env, worker-pool, HUGE_POOL_SIZE ); +rPool=worker-mbean-pool-create( env, worker-mbean-pool, HUGE_POOL_SIZE ); env-l-jkLog(env, env-l, JK_LOG_INFO, mod_jk.handler(): new rpool\n); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c
nacho 02/04/20 15:57:16 Modified:jk/native2/common jk_map.c jk/native2/include jk_service.h jk/native2/server/apache2 jk_logger_apache2.c Log: * Cometic fixes less warnings * Some function definition fixes for win32 * ifdef not needed for win32 fixed by define Revision ChangesPath 1.17 +1 -2 jakarta-tomcat-connectors/jk/native2/common/jk_map.c Index: jk_map.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_map.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- jk_map.c 19 Mar 2002 04:53:40 - 1.16 +++ jk_map.c 20 Apr 2002 22:57:16 - 1.17 @@ -58,7 +58,7 @@ /*** * Description: General purpose map object * * Author: Gal Shachor [EMAIL PROTECTED] * - * Version: $Revision: 1.16 $ * + * Version: $Revision: 1.17 $ * ***/ #include jk_global.h @@ -147,7 +147,6 @@ const char *name, void *value) { int rc = JK_FALSE; -int i; jk_map_private_t *mPriv; if( name==NULL ) 1.11 +4 -4 jakarta-tomcat-connectors/jk/native2/include/jk_service.h Index: jk_service.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_service.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- jk_service.h 20 Mar 2002 23:44:00 - 1.10 +++ jk_service.h 20 Apr 2002 22:57:16 - 1.11 @@ -63,7 +63,7 @@ * Author: Gal Shachor [EMAIL PROTECTED] * * Author: Dan Milstein [EMAIL PROTECTED]* * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.10 $ * + * Version: $Revision: 1.11 $ * ***/ #ifndef JK_SERVICE_H @@ -267,7 +267,7 @@ /** printf style output. Formats in the tmp buf, then calls write */ -void (*jkprintf)( struct jk_env *env, struct jk_ws_service *s, char *frm,... ); +void (JK_METHOD *jkprintf)( struct jk_env *env, struct jk_ws_service *s, char *frm,... ); /* * Callbacks into the web server. For each, the first argument is @@ -277,12 +277,12 @@ /* Initialize the service structure */ -int (*init)( struct jk_env *env, jk_ws_service_t *_this, +int (JK_METHOD *init)( struct jk_env *env, jk_ws_service_t *_this, struct jk_worker *w, void *serverObj); /* Post request cleanup. */ -void (*afterRequest)( struct jk_env *env, jk_ws_service_t *_this ); +void (JK_METHOD *afterRequest)( struct jk_env *env, jk_ws_service_t *_this ); /* * Set the response head in the server structures. This will be called 1.19 +1 -3 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- jk_logger_apache2.c 12 Apr 2002 21:55:05 - 1.18 +++ jk_logger_apache2.c 20 Apr 2002 22:57:16 - 1.19 @@ -134,9 +134,7 @@ return JK_FALSE; } -#ifdef WIN32 -rc = _vsnprintf(buf, HUGE_BUFFER_SIZE, fmt, args); -#elif defined(NETWARE) /* until we get a vsnprintf function */ +#if defined(NETWARE) /* until we get a vsnprintf function */ /* XXX Can we use a pool ? */ /* XXX It'll go away with env and per thread data !! */ buf = (char *) malloc(HUGE_BUFFER_SIZE); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c jk_service_apache2.c
costin 02/04/02 11:03:22 Modified:jk/native2/server/apache2 jk_logger_apache2.c jk_service_apache2.c Log: Small fixes Revision ChangesPath 1.17 +4 -1 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- jk_logger_apache2.c 26 Mar 2002 03:04:54 - 1.16 +++ jk_logger_apache2.c 2 Apr 2002 19:03:22 - 1.17 @@ -141,7 +141,6 @@ /* XXX It'll go away with env and per thread data !! */ buf = (char *) malloc(HUGE_BUFFER_SIZE); rc = vsprintf(buf, fmt, args); -free(buf); #else rc = vsnprintf(buf, HUGE_BUFFER_SIZE, fmt, args); #endif @@ -157,6 +156,10 @@ } else { ap_log_error( file, line, APLOG_ERR | APLOG_NOERRNO, 0, s, buf); } + +#ifdef NETWARE +free(buf); +#endif return rc ; } 1.14 +3 -3 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c Index: jk_service_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- jk_service_apache2.c 24 Mar 2002 19:22:19 - 1.13 +++ jk_service_apache2.c 2 Apr 2002 19:03:22 - 1.14 @@ -59,7 +59,7 @@ * Description: Apache 2 plugin for Jakarta/Tomcat * Author: Gal Shachor [EMAIL PROTECTED] * Henri Gomez [EMAIL PROTECTED] - * Version: $Revision: 1.13 $ + * Version: $Revision: 1.14 $ */ #include apu_compat.h @@ -277,8 +277,8 @@ while( ll 0 ) { unsigned long toSend=(llCHUNK_SIZE) ? CHUNK_SIZE : ll; r = ap_rwrite((const char *)bb, toSend, s-ws_private ); -env-l-jkLog(env, env-l, JK_LOG_INFO, - service.write() %ld (%ld) out of %ld \n,toSend, r, ll ); +/* env-l-jkLog(env, env-l, JK_LOG_INFO, */ +/* service.write() %ld (%ld) out of %ld \n,toSend, r, ll ); */ ll-=CHUNK_SIZE; bb+=CHUNK_SIZE; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c mod_jk2.c
costin 02/03/25 19:04:54 Modified:jk/native2/server/apache13 mod_jk2.c jk/native2/server/apache2 jk_logger_apache2.c mod_jk2.c Log: Update to the interface changes, implement the vargs logging function in logger.apache2 Revision ChangesPath 1.8 +25 -11jakarta-tomcat-connectors/jk/native2/server/apache13/mod_jk2.c Index: mod_jk2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache13/mod_jk2.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mod_jk2.c 25 Mar 2002 03:31:41 - 1.7 +++ mod_jk2.c 26 Mar 2002 03:04:54 - 1.8 @@ -59,7 +59,7 @@ * Description: Apache 1.3 plugin for Jakarta/Tomcat * * Author: Gal Shachor [EMAIL PROTECTED] * * Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.7 $ * + * Version: $Revision: 1.8 $ * ***/ /* @@ -138,6 +138,7 @@ jk_env_t *env; jk_logger_t *l; jk_pool_t *globalPool; +jk_bean_t *jkb; /** First create a pool. We use the default ( jk ) pool impl, * other choices are apr or native. @@ -156,12 +157,16 @@ /* Create the logger . We use the default jk logger, will output to a file. Check the logger for default settings. */ -l = env-createInstance( env, env-globalPool, logger.file, logger); +jkb=env-createBean2( env, env-globalPool, logger.file, ); +l = jkb-object; env-l=l; +env-alias( env, logger.file:, logger); /* Create the workerEnv */ -workerEnv= env-createInstance( env, env-globalPool,workerEnv, workerEnv); +jkb=env-createBean2( env, env-globalPool,workerEnv, ); +workerEnv= jkb-object; +env-alias( env, workerEnv:, workerEnv); if( workerEnv==NULL || l== NULL ) { fprintf( stderr, Error initializing jk, NULL objects \n); @@ -195,6 +200,7 @@ static void *jk2_create_config(ap_pool *p, server_rec *s) { jk_uriEnv_t *newUri; +jk_bean_t *jkb; if( workerEnv==NULL ) { jk2_create_workerEnv(p, s ); @@ -207,9 +213,10 @@ fprintf( stderr, Create config for main host\n); } -newUri = workerEnv-globalEnv-createInstance( workerEnv-globalEnv, - workerEnv-pool, - uri, NULL ); +jkb=workerEnv-globalEnv-createBean2( workerEnv-globalEnv, + workerEnv-pool, + uri, NULL ); +newUri = jkb-object; newUri-workerEnv=workerEnv; return newUri; } @@ -257,6 +264,7 @@ env-l-jkLog(env, env-l, JK_LOG_INFO, mod_jk.post_config() init worker env\n); + workerEnv-init(env, workerEnv ); workerEnv-server_name = (char *)ap_get_server_version(); @@ -292,13 +300,14 @@ if(uriEnv==NULL || strcmp(r-handler,JK_HANDLER)!= 0 ) return DECLINED; -/* XXX Get an env instance */ -env = workerEnv-globalEnv; +/* Get an env instance */ +env = workerEnv-globalEnv-getEnv( workerEnv-globalEnv ); /* Set up r-read_chunked flags for chunked encoding, if present */ if(rc = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)) { env-l-jkLog(env, env-l, JK_LOG_INFO, mod_jk.handler() Can't setup client block %d\n, rc); +workerEnv-globalEnv-releaseEnv( workerEnv-globalEnv, env ); return rc; } @@ -326,6 +335,7 @@ if(worker==NULL ) { env-l-jkLog(env, env-l, JK_LOG_ERROR, mod_jk.handle() No worker for %s\n, r-uri); +workerEnv-globalEnv-releaseEnv( workerEnv-globalEnv, env ); return 500; } @@ -369,11 +379,13 @@ } if(rc==JK_TRUE) { +workerEnv-globalEnv-releaseEnv( workerEnv-globalEnv, env ); return OK;/* NOT r-status, even if it has changed. */ } env-l-jkLog(env, env-l, JK_LOG_ERROR, mod_jk.handler() Error connecting to tomcat %d\n, rc); +workerEnv-globalEnv-releaseEnv( workerEnv-globalEnv, env ); return 500; } @@ -393,12 +405,13 @@ if( workerEnv-uriMap-size == 0 ) return DECLINED; -/* XXX get_env() */ -env=workerEnv-globalEnv; +/* get_env() */ +env = workerEnv-globalEnv-getEnv( workerEnv-globalEnv ); uriEnv = workerEnv-uriMap-mapUri(env,
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c jk_map_aprtable.c mod_jk2.c
costin 02/03/23 09:15:08 Modified:jk/native2/server/apache13 mod_jk2.c jk/native2/server/apache2 jk_logger_apache2.c jk_map_aprtable.c mod_jk2.c Log: Few fixes, add a setAttribute to jk_logger_apache2. Now both Apache1.3 and Apache2 are working ( with the new config ), and are able to serve at least the status page. I'll start re-checking ajp13. Revision ChangesPath 1.6 +3 -3 jakarta-tomcat-connectors/jk/native2/server/apache13/mod_jk2.c Index: mod_jk2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache13/mod_jk2.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- mod_jk2.c 19 Mar 2002 04:55:57 - 1.5 +++ mod_jk2.c 23 Mar 2002 17:15:08 - 1.6 @@ -59,7 +59,7 @@ * Description: Apache 1.3 plugin for Jakarta/Tomcat * * Author: Gal Shachor [EMAIL PROTECTED] * * Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.5 $ * + * Version: $Revision: 1.6 $ * ***/ /* @@ -326,8 +326,8 @@ if( worker==NULL uriEnv-workerName != NULL ) { worker=env-getByName( env,uriEnv-workerName); env-l-jkLog(env, env-l, JK_LOG_INFO, - mod_jk.handler() finding worker for %p %p\n, - worker, uriEnv ); + mod_jk.handler() finding worker for %s %p %p\n, + uriEnv-workerName, worker, uriEnv ); uriEnv-worker=worker; } } 1.15 +18 -0 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- jk_logger_apache2.c 18 Mar 2002 18:46:27 - 1.14 +++ jk_logger_apache2.c 23 Mar 2002 17:15:08 - 1.15 @@ -162,6 +162,23 @@ return rc ; } +static int JK_METHOD +jk2_logger_file_setProperty(jk_env_t *env, jk_bean_t *mbean, +char *name, void *valueP ) +{ +jk_logger_t *_this=mbean-object; +char *value=valueP; + +if( strcmp( name, level )==0 ) { +_this-level = jk2_logger_file_parseLogLevel(env, value); +if( _this-level == 0 ) { +_this-jkLog( env, _this, JK_LOG_ERROR, + Level %s %d \n, value, _this-level ); +} +} +} + + int jk2_logger_apache2_factory(jk_env_t *env, jk_pool_t *pool, jk_bean_t *result, char *type, char *name) @@ -182,6 +199,7 @@ result-object=(void *)l; l-mbean=result; +result-setAttribute = jk2_logger_file_setProperty; return JK_TRUE; } 1.8 +1 -1 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_map_aprtable.c Index: jk_map_aprtable.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_map_aprtable.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- jk_map_aprtable.c 18 Mar 2002 18:46:27 - 1.7 +++ jk_map_aprtable.c 23 Mar 2002 17:15:08 - 1.8 @@ -87,7 +87,7 @@ { apr_table_t *aprMap=_this-_private; if( oldValue != NULL ) { -*oldValue=apr_table_get( aprMap, (char *)name ); +*oldValue=(void *)apr_table_get( aprMap, (char *)name ); } apr_table_setn( aprMap, name, (char *)value ); 1.6 +4 -1 jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c Index: mod_jk2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk2.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- mod_jk2.c 19 Mar 2002 04:55:57 - 1.5 +++ mod_jk2.c 23 Mar 2002 17:15:08 - 1.6 @@ -59,7 +59,7 @@ * Description: Apache 2 plugin for Jakarta/Tomcat * * Author: Gal Shachor [EMAIL PROTECTED] * * Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.5 $ * + * Version: $Revision: 1.6 $
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c jk_map_aprtable.c jk_pool_apr.c jk_service_apache2.c
costin 02/01/06 01:06:02 Modified:jk/native2 build.xml jk/native2/common jk_handler_response.c jk_lb_worker.c jk/native2/common/apr jk_channel_apr_socket.c jk/native2/server/apache2 jk_logger_apache2.c jk_map_aprtable.c jk_pool_apr.c jk_service_apache2.c Log: Few fixes and debug statements. I reverted to use jk maps for now, there's a strange bug with apr maps. The extra debug statements will be removed after I figure out the problem. Revision ChangesPath 1.10 +1 -1 jakarta-tomcat-connectors/jk/native2/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/build.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- build.xml 5 Jan 2002 10:03:43 - 1.9 +++ build.xml 6 Jan 2002 09:06:02 - 1.10 @@ -43,7 +43,7 @@ !-- Targets -- - target name=main depends=init,apache20,jni,apache13,unixsocket + target name=main depends=init,apache20,jni,unixsocket /target target name=init 1.12 +3 -3 jakarta-tomcat-connectors/jk/native2/common/jk_handler_response.c Index: jk_handler_response.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_handler_response.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- jk_handler_response.c 17 Dec 2001 07:17:08 - 1.11 +++ jk_handler_response.c 6 Jan 2002 09:06:02 - 1.12 @@ -166,9 +166,9 @@ jk_xlate_from_ascii(valueS, strlen(valueS)); -/* env-l-jkLog(env, env-l, JK_LOG_INFO, */ -/* handler.response() Header[%d] [%s] = [%s]\n, */ -/* i, nameS, valueS); */ +env-l-jkLog(env, env-l, JK_LOG_INFO, + handler.response() Header[%d] [%s] = [%s]\n, + i, nameS, valueS); /* Do we want this ? Preserve the headers, maybe someone will need them. Alternative is to use a different buffer every time, 1.11 +5 -4 jakarta-tomcat-connectors/jk/native2/common/jk_lb_worker.c Index: jk_lb_worker.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_lb_worker.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- jk_lb_worker.c16 Dec 2001 23:18:11 - 1.10 +++ jk_lb_worker.c6 Jan 2002 09:06:02 - 1.11 @@ -60,7 +60,7 @@ * several workers. * * Author: Gal Shachor [EMAIL PROTECTED] * * Based on: * - * Version: $Revision: 1.10 $ * + * Version: $Revision: 1.11 $ * ***/ #include jk_pool.h @@ -110,7 +110,7 @@ It'll also adjust the load balancing factors. */ static jk_worker_t *get_most_suitable_worker(jk_env_t *env, jk_worker_t *p, - jk_ws_service_t *s) + jk_ws_service_t *s, int attempt) { jk_worker_t *rc = NULL; double lb_min = 0.0; @@ -120,7 +120,7 @@ if(session_route) { for(i = 0 ; i p-num_of_workers ; i++) { if(0 == strcmp(session_route, p-lb_workers[i]-name)) { -if(p-lb_workers[i]-in_error_state) { +if(attempt 0 p-lb_workers[i]-in_error_state) { break; } else { return p-lb_workers[i]; @@ -165,6 +165,7 @@ { /* The 'real' endpoint */ jk_endpoint_t *end = NULL; +int attempt=0; if(e==NULL || s==NULL || is_recoverable_error==NULL) { env-l-jkLog(env, env-l, JK_LOG_ERROR, @@ -177,7 +178,7 @@ e-realEndpoint=NULL; while(1) { -jk_worker_t *rec = get_most_suitable_worker(env, e-worker, s); +jk_worker_t *rec = get_most_suitable_worker(env, e-worker, s, attempt++); int rc; int is_recoverable = JK_FALSE; 1.2 +15 -15 jakarta-tomcat-connectors/jk/native2/common/apr/jk_channel_apr_socket.c Index: jk_channel_apr_socket.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/apr/jk_channel_apr_socket.c,v retrieving
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c jk_map_aprtable.c
costin 01/12/15 09:25:45 Modified:jk/native2/server/apache2 jk_logger_apache2.c jk_map_aprtable.c Log: Added the missing check for level in jk_logger_apache2. Finish jk_map_aprtable. Revision ChangesPath 1.9 +1 -1 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- jk_logger_apache2.c 2001/12/14 07:14:59 1.8 +++ jk_logger_apache2.c 2001/12/15 17:25:45 1.9 @@ -132,7 +132,7 @@ char buf[HUGE_BUFFER_SIZE]; #endif -if( level = l-level ) +if( level l-level ) return JK_TRUE; if( s==NULL ) { 1.2 +30 -0 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_map_aprtable.c Index: jk_map_aprtable.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_map_aprtable.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_map_aprtable.c 2001/12/14 07:11:42 1.1 +++ jk_map_aprtable.c 2001/12/15 17:25:45 1.2 @@ -95,6 +95,16 @@ return JK_TRUE; } +static int jk_map_aprtable_add( struct jk_env *env, struct jk_map *_this, +const char *name, void *value ) +{ +apr_table_t *aprMap=_this-_private; + +apr_table_addn( aprMap, name, (char *)value ); + +return JK_TRUE; +} + static int jk_map_aprtable_size( struct jk_env *env, struct jk_map *_this ) { apr_table_t *aprMap=_this-_private; @@ -125,6 +135,17 @@ return elts[pos].val; } +static void jk_map_aprtable_init(jk_env_t *env, jk_map_t *m, int initialSize, +void *wrappedObj) +{ +m-_private=wrappedObj; +} + +static void jk_map_aprtable_clear(jk_env_t *env, jk_map_t *m) +{ + +} + /* Not used yet */ int jk_map_aprtable_factory(jk_env_t *env, jk_pool_t *pool, @@ -134,6 +155,15 @@ jk_map_t *_this=(jk_map_t *)pool-calloc( pool, sizeof(jk_map_t)); *result=_this; + +_this-get=jk_map_aprtable_get; +_this-put=jk_map_aprtable_put; +_this-add=jk_map_aprtable_add; +_this-size=jk_map_aprtable_size; +_this-nameAt=jk_map_aprtable_nameAt; +_this-valueAt=jk_map_aprtable_valueAt; +_this-init=jk_map_aprtable_init; +_this-clear=jk_map_aprtable_clear; return JK_TRUE; } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c jk_pool_apr.c jk_service_apache2.c mod_jk.c
costin 01/12/13 11:05:31 Modified:jk/native2/server/apache2 jk_logger_apache2.c jk_pool_apr.c jk_service_apache2.c mod_jk.c Log: Renamed jk_service-finalize to afterRequest ( finalize is too overloaded ). Updates, make it compile again :-) Revision ChangesPath 1.7 +2 -0 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- jk_logger_apache2.c 2001/12/12 23:36:01 1.6 +++ jk_logger_apache2.c 2001/12/13 19:05:31 1.7 @@ -83,6 +83,8 @@ #include httpd.h #include http_log.h +#include jk_apache2.h + #define HUGE_BUFFER_SIZE (8*1024) int JK_METHOD jk_logger_apache2_factory(jk_env_t *env, jk_pool_t *pool, 1.4 +5 -3 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_pool_apr.c Index: jk_pool_apr.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_pool_apr.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- jk_pool_apr.c 2001/12/06 22:50:25 1.3 +++ jk_pool_apr.c 2001/12/13 19:05:31 1.4 @@ -66,6 +66,8 @@ #include apr_pools.h #include apr_strings.h +#include jk_apache2.h + int jk_pool_apr_create( jk_pool_t **newPool, jk_pool_t *parent, apr_pool_t *aprPool ); int JK_METHOD jk_pool_apr_factory(jk_env_t *env, @@ -163,9 +165,9 @@ } /* Not used yet */ -int JK_METHOD jk_pool_apr_factory(jk_env_t *env, jk_pool_t *pool, - void **result, - char *type, char *name) +int jk_pool_apr_factory(jk_env_t *env, jk_pool_t *pool, + void **result, + char *type, char *name) { jk_pool_t *_this=(jk_pool_t *)calloc( 1, sizeof(jk_pool_t)); 1.2 +6 -7 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c Index: jk_service_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_service_apache2.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_service_apache2.c 2001/12/13 18:50:33 1.1 +++ jk_service_apache2.c 2001/12/13 19:05:31 1.2 @@ -59,7 +59,7 @@ * Description: Apache 2 plugin for Jakarta/Tomcat * Author: Gal Shachor [EMAIL PROTECTED] * Henri Gomez [EMAIL PROTECTED] - * Version: $Revision: 1.1 $ + * Version: $Revision: 1.2 $ */ #include apu_compat.h @@ -276,11 +276,10 @@ jk_endpoint_t *e, void *serverObj) { -request_rec *r=s-ws_private; -jk_logger_t *l=workerEnv-l; apr_port_t port; char *ssl_temp = NULL; jk_workerEnv_t *workerEnv=e-worker-workerEnv; +jk_logger_t *l=workerEnv-l; request_rec *r=serverObj; /* Common initialization */ @@ -495,7 +494,7 @@ * jk shouldn't do it instead, and the user should get the * error message ! */ -static int jk_service_apache2_finalize(jk_ws_service_t *s ) +static void jk_service_apache2_afterRequest(jk_ws_service_t *s ) { if (s-content_read s-content_length || @@ -521,10 +520,10 @@ { jk_ws_service_t *s = *result; if( s==NULL ) { -s=(jk_ws_service_t *)pool-calloc(pool, sizeof(jk_service_t)); +s=(jk_ws_service_t *)pool-calloc(pool, sizeof(jk_ws_service_t)); } -if(l==NULL ) { +if(s==NULL ) { return JK_FALSE; } @@ -532,7 +531,7 @@ s-read = ws_read; s-write= ws_write; s-init = init_ws_service; -s-finalize = jk_service_apache2_finalize; +s-afterRequest = jk_service_apache2_afterRequest; *result=(void *)s; 1.10 +47 -455 jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk.c Index: mod_jk.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- mod_jk.c 2001/12/12 22:07:25 1.9 +++ mod_jk.c 2001/12/13 19:05:31 1.10 @@ -59,7 +59,7 @@ * Description: Apache 2 plugin for
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c
costin 01/12/12 15:36:01 Modified:jk/native2/common jk_ajp14_worker.c jk_channel_socket.c jk_env.c jk_handler_response.c jk_jni_worker.c jk_msg_ajp.c jk_uriMap.c jk_workerEnv.c jk/native2/server/apache2 jk_logger_apache2.c Log: Hunting malloc/frees. minor fixes. Cosmetic: change p to pool for easier grepping. We now have only 2 places where malloc/free is used ( only at startup time). We still need to check and make sure the pools are destroyed/reset when needed, but the hard part was getting all the code to use pools. ( note that I haven't tested the jk_pool code for a while, I'm using the apr_pool. When I start udating the other connectors I'll have to use jk_pool anyway ) Revision ChangesPath 1.7 +4 -6 jakarta-tomcat-connectors/jk/native2/common/jk_ajp14_worker.c Index: jk_ajp14_worker.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_ajp14_worker.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- jk_ajp14_worker.c 2001/12/12 21:45:55 1.6 +++ jk_ajp14_worker.c 2001/12/12 23:36:01 1.7 @@ -131,14 +131,13 @@ w-connect_retry_attempts= AJP_DEF_RETRY_ATTEMPTS; w-channel= NULL; +w-secret= NULL; w-validate= jk_worker_ajp14_validate; w-init= jk_worker_ajp14_init; w-get_endpoint= jk_worker_ajp14_getEndpoint; w-destroy=jk_worker_ajp14_destroy; -w-logon= NULL; - *result = w; l-jkLog(l, JK_LOG_INFO, ajp14.factory() Created %s %s\n, @@ -172,7 +171,6 @@ ajp14.validate() No secretkey, use AJP13\n); proto=AJP13_PROTO; aw-proto= AJP13_PROTO; -aw-logon= NULL; } if (proto == AJP13_PROTO) { @@ -243,7 +241,7 @@ } /* Check if we must execute a logon after the physical connect */ -if (ae-worker-logon == NULL) +if (ae-worker-secret == NULL) return JK_TRUE; /* Do the logon process */ @@ -519,10 +517,10 @@ if( secret_key==NULL ) { proto=AJP13_PROTO; _this-proto= AJP13_PROTO; -_this-logon= NULL; +_this-secret=NULL; } else { /* Set Secret Key (used at logon time) */ -_this-secret = strdup(secret_key); +_this-secret = _this-pool-pstrdup(_this-pool, secret_key); } 1.7 +13 -5 jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c Index: jk_channel_socket.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- jk_channel_socket.c 2001/12/12 21:53:58 1.6 +++ jk_channel_socket.c 2001/12/12 23:36:01 1.7 @@ -64,6 +64,8 @@ * - port * - ndelay * + * This channel should 'live' as much as the workerenv. It is stateless. + * It allocates memory for endpoint private data ( using endpoint's pool ). * * @author: Gal Shachor [EMAIL PROTECTED] * @author: Costin Manolache @@ -288,7 +290,8 @@ jk_channel_socket_data_t *sd=endpoint-channelData; if( sd==NULL ) { sd=(jk_channel_socket_data_t *) -malloc( sizeof( jk_channel_socket_data_t )); +endpoint-pool-calloc( endpoint-pool, +sizeof( jk_channel_socket_data_t )); endpoint-channelData=sd; } sd-sock=sock; @@ -306,8 +309,12 @@ jk_channel_socket_data_t *chD=endpoint-channelData; if( chD==NULL ) return JK_FALSE; -sd=chD-sock; +sd=chD-sock; +chD-sock=-1; +/* nothing else to clean, the socket_data was allocated ouf of + * endpoint's pool + */ return jk_close_socket(sd); } @@ -399,7 +406,8 @@ -int JK_METHOD jk_channel_socket_factory(jk_env_t *env, jk_pool_t *pool, void **result, +int JK_METHOD jk_channel_socket_factory(jk_env_t *env, jk_pool_t *pool, +void **result, const char *type, const char *name) { jk_channel_t *_this; @@ -409,10 +417,10 @@ *result=NULL; return JK_FALSE; } -_this=(jk_channel_t *)pool-alloc(pool, sizeof( jk_channel_t)); +_this=(jk_channel_t *)pool-calloc(pool, sizeof( jk_channel_t)); _this-_privatePtr= (jk_channel_socket_private_t *) - pool-alloc( pool, sizeof( jk_channel_socket_private_t)); + pool-calloc( pool, sizeof( jk_channel_socket_private_t)); _this-recv= jk_channel_socket_recv;
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c
costin 01/12/07 15:07:24 Modified:jk/native2/server/apache2 jk_logger_apache2.c Log: Better error level translation. Revision ChangesPath 1.5 +5 -3 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- jk_logger_apache2.c 2001/12/06 22:50:25 1.4 +++ jk_logger_apache2.c 2001/12/07 23:07:24 1.5 @@ -153,10 +153,12 @@ if( buf[rc-1] == '\n' ) buf[rc-1]='\0'; -if( level = JK_LOG_ERROR_LEVEL ) { -ap_log_error( file, line, APLOG_EMERG | APLOG_NOERRNO, 0, s, buf); -} else { +if( level == JK_LOG_DEBUG_LEVEL ) { ap_log_error( file, line, APLOG_DEBUG | APLOG_NOERRNO, 0, s, buf); +} else if( level == JK_LOG_INFO_LEVEL ) { +ap_log_error( file, line, APLOG_WARNING | APLOG_NOERRNO, 0, s, buf); +} else { +ap_log_error( file, line, APLOG_ERR | APLOG_NOERRNO, 0, s, buf); } return rc ; } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c jk_pool_apr.c mod_jk.c
costin 01/12/06 14:50:25 Modified:jk/native2/server/apache2 jk_logger_apache2.c jk_pool_apr.c mod_jk.c Log: Update for the interface changes. Various fixes Update the code the initialize jk. Revision ChangesPath 1.4 +3 -1 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- jk_logger_apache2.c 2001/12/05 20:49:48 1.3 +++ jk_logger_apache2.c 2001/12/06 22:50:25 1.4 @@ -85,7 +85,8 @@ #define HUGE_BUFFER_SIZE (8*1024) -int JK_METHOD jk_logger_apache2_factory(jk_env_t *env, void **result, +int JK_METHOD jk_logger_apache2_factory(jk_env_t *env, jk_pool_t *pool, +void **result, char *type, char *name); @@ -162,6 +163,7 @@ int jk_logger_apache2_factory(jk_env_t *env, + jk_pool_t *pool, void **result, char *type, char *name) 1.3 +37 -28 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_pool_apr.c Index: jk_pool_apr.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_pool_apr.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- jk_pool_apr.c 2001/12/05 20:49:48 1.2 +++ jk_pool_apr.c 2001/12/06 22:50:25 1.3 @@ -66,26 +66,27 @@ #include apr_pools.h #include apr_strings.h -int jk_pool_apr_create( jk_pool_t **newPool, jk_pool_t *parent ); +int jk_pool_apr_create( jk_pool_t **newPool, jk_pool_t *parent, apr_pool_t *aprPool ); -int JK_METHOD jk_pool_apr_factory(jk_env_t *env, void **result, +int JK_METHOD jk_pool_apr_factory(jk_env_t *env, + jk_pool_t *pool, + void **result, char *type, char *name); -void jk_pool_apr_open(jk_pool_t *_this, apr_pool_t *realPool ); - - -/** Nothing - apache will take care +/** Nothing - apache will take care ?? */ -static void jk_close_pool(jk_pool_t *p) +static void jk_pool_apr_close(jk_pool_t *p) { + } /** Nothing - apache will take care. XXX with jk pools we can implement 'recycling', not sure what's the equivalent for apache */ -static void jk_reset_pool(jk_pool_t *p) +static void jk_pool_apr_reset(jk_pool_t *p) { +apr_pool_clear(p-_private); } static void *jk_pool_apr_calloc(jk_pool_t *p, @@ -96,7 +97,7 @@ } static void *jk_pool_apr_alloc(jk_pool_t *p, - size_t size) + size_t size) { return apr_palloc( (apr_pool_t *)p-_private, (apr_size_t)size); } @@ -128,41 +129,49 @@ -/* Not implemented yet */ -int jk_pool_apr_create( jk_pool_t **newPool, jk_pool_t *parent ) { +static jk_pool_t *jk_pool_apr_createChild( jk_pool_t *_this, int sizeHint ) { +apr_pool_t *parentAprPool=_this-_private; +apr_pool_t *childAprPool; +jk_pool_t *newPool; -return JK_TRUE; +apr_pool_create( childAprPool, parentAprPool ); + +jk_pool_apr_create( newPool, _this, childAprPool ); + +return newPool; } + + +int jk_pool_apr_create( jk_pool_t **newPool, jk_pool_t *parent, apr_pool_t *aprPool) +{ +jk_pool_t *_this=(jk_pool_t *)apr_palloc(aprPool, sizeof( jk_pool_t )); + +_this-_private=aprPool; + +*newPool = _this; -static void init_methods(jk_pool_t *_this ) { -_this-open=jk_open_pool; -_this-close=jk_close_pool; -_this-reset=jk_reset_pool; +/* methods */ +_this-create=jk_pool_apr_createChild; +_this-close=jk_pool_apr_close; +_this-reset=jk_pool_apr_reset; _this-alloc=jk_pool_apr_alloc; _this-calloc=jk_pool_apr_calloc; _this-pstrdup=jk_pool_apr_strdup; _this-realloc=jk_pool_apr_realloc; + +return JK_TRUE; } /* Not used yet */ -int JK_METHOD jk_pool_apr_factory(jk_env_t *env, void **result, - char *type, char *name) +int JK_METHOD jk_pool_apr_factory(jk_env_t *env, jk_pool_t *pool, + void **result, + char *type, char *name) { jk_pool_t *_this=(jk_pool_t *)calloc( 1, sizeof(jk_pool_t)); -init_methods(_this ); - *result=_this; return JK_TRUE; -} - -/*
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c jk_pool_apr.c mod_jk.c
costin 01/12/05 12:49:48 Modified:jk/native2/server/apache2 jk_logger_apache2.c jk_pool_apr.c mod_jk.c Log: Few small fixes in apache logger and pool. Removed the old 'manual config' code, it'll be replaced with 'real' per_dir struct. Revision ChangesPath 1.3 +1 -1 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- jk_logger_apache2.c 2001/12/04 19:11:56 1.2 +++ jk_logger_apache2.c 2001/12/05 20:49:48 1.3 @@ -152,7 +152,7 @@ if( buf[rc-1] == '\n' ) buf[rc-1]='\0'; -if( level = JK_LOG_ERROR ) { +if( level = JK_LOG_ERROR_LEVEL ) { ap_log_error( file, line, APLOG_EMERG | APLOG_NOERRNO, 0, s, buf); } else { ap_log_error( file, line, APLOG_DEBUG | APLOG_NOERRNO, 0, s, buf); 1.2 +11 -1 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_pool_apr.c Index: jk_pool_apr.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_pool_apr.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_pool_apr.c 2001/12/05 00:11:27 1.1 +++ jk_pool_apr.c 2001/12/05 20:49:48 1.2 @@ -64,7 +64,16 @@ #include jk_pool.h #include jk_env.h #include apr_pools.h +#include apr_strings.h +int jk_pool_apr_create( jk_pool_t **newPool, jk_pool_t *parent ); + +int JK_METHOD jk_pool_apr_factory(jk_env_t *env, void **result, + char *type, char *name); + +void jk_pool_apr_open(jk_pool_t *_this, apr_pool_t *realPool ); + + /** Nothing - apache will take care */ static void jk_close_pool(jk_pool_t *p) @@ -112,10 +121,11 @@ } static void *jk_pool_apr_strdup(jk_pool_t *p, -const char *s) +const char *s) { return apr_pstrdup( (apr_pool_t *)p-_private, s); } + /* Not implemented yet */ 1.6 +8 -32 jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk.c Index: mod_jk.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/mod_jk.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- mod_jk.c 2001/12/04 23:59:01 1.5 +++ mod_jk.c 2001/12/05 20:49:48 1.6 @@ -60,7 +60,7 @@ * Description: Apache 2 plugin for Jakarta/Tomcat * * Author: Gal Shachor [EMAIL PROTECTED] * * Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.5 $ * + * Version: $Revision: 1.6 $ * ***/ /* @@ -1124,46 +1124,22 @@ return DECLINED; workerEnv = (jk_workerEnv_t *)ap_get_module_config(r-server-module_config, - jk_module); -worker_name = apr_table_get(r-notes, JK_WORKER_ID); + jk_module); l = workerEnv-l; +worker_name = apr_table_get(r-notes, JK_WORKER_ID); + /* Set up r-read_chunked flags for chunked encoding, if present */ if(rc = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)) { return rc; } if( worker_name == NULL ) { - /* we may be here because of a manual directive ( that overrides - translate and - sets the handler directly ). We still need to know the worker. - */ - if( workerEnv-num_of_workers == 1 ) { - /** We have a single worker ( the common case ). - ( lb is a bit special, it should count as a single worker but - I'm not sure how ). We also have a manual config directive that - explicitely give control to us. */ - worker = workerEnv-defaultWorker; - worker_name=worker-name; - l-jkLog(l, JK_LOG_DEBUG, +/* SetHandler case - per_dir config should have the worker*/ +worker = workerEnv-defaultWorker; +worker_name=worker-name; +l-jkLog(l, JK_LOG_DEBUG, Default worker for %s %s\n, r-uri, worker-name); - } else { - jk_uriMap_t *uriMap=workerEnv-uriMap; - jk_uriEnv_t *uriEnv; - -
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c
costin 01/12/04 11:11:56 Modified:jk/native2/common jk_logger_file.c jk/native2/server/apache2 jk_logger_apache2.c Log: Few fixes in logger. Apache logger will use 'warn' level for normal jk messages, 'error' for jk errors. Revision ChangesPath 1.4 +3 -4 jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c Index: jk_logger_file.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- jk_logger_file.c 2001/12/02 02:09:44 1.3 +++ jk_logger_file.c 2001/12/04 19:11:56 1.4 @@ -59,10 +59,9 @@ * Description: Utility functions (mainly configuration) * * Author: Gal Shachor [EMAIL PROTECTED] * * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.3 $ * + * Version: $Revision: 1.4 $ * ***/ -#include jk_util.h #include jk_env.h #include jk_map.h #include jk_logger.h @@ -158,7 +157,7 @@ _this-level = jk_logger_file_parseLogLevel(levelS); if( _this-level == 0 ) -_this-jkLog( _this, JK_LOG_ERROR, Level %s %d \n, levelS, _this-level ); */ +_this-jkLog( _this, JK_LOG_ERROR, Level %s %d \n, levelS, _this-level ); if( logformat==NULL ) { logformat=JK_TIME_FORMAT; @@ -228,7 +227,7 @@ if (NULL == buf) return -1; - set_time_str(buf, HUGE_BUFFER_SIZE); + jk_logger_file_setTimeStr(buf, HUGE_BUFFER_SIZE); used = strlen(buf); used += sprintf(buf[used], [%s (%d)]: , f, line); #else 1.2 +10 -2 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_logger_apache2.c 2001/12/02 22:09:54 1.1 +++ jk_logger_apache2.c 2001/12/04 19:11:56 1.2 @@ -75,13 +75,13 @@ * @author Costin Manolache */ -#include jk_util.h #include jk_env.h #include jk_map.h #include jk_logger.h #include stdio.h #include httpd.h +#include http_log.h #define HUGE_BUFFER_SIZE (8*1024) @@ -147,8 +147,16 @@ rc = vsnprintf(buf, HUGE_BUFFER_SIZE, fmt, args); #endif va_end(args); +rc=strlen( buf ); +/* Remove trailing \n. XXX need to change the log() to not include \n */ +if( buf[rc-1] == '\n' ) +buf[rc-1]='\0'; -ap_log_error( file, line, level, 0, s, buf); +if( level = JK_LOG_ERROR ) { +ap_log_error( file, line, APLOG_EMERG | APLOG_NOERRNO, 0, s, buf); +} else { +ap_log_error( file, line, APLOG_DEBUG | APLOG_NOERRNO, 0, s, buf); +} return rc ; } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/server/apache2 jk_logger_apache2.c
costin 01/12/02 14:09:54 Added: jk/native2/server/apache2 jk_logger_apache2.c Log: A logger implementation that send the logs to apache's error.log. Instead of tracking 2 log files and setting up mod_jk.log, we now use the native log format. This is not yet completed, but works. One big question is if we can pass the (...) params ( using va_list or some other tricks ) from one function to another. ( apache's log have no va_arg variant for the log function ) Revision ChangesPath 1.1 jakarta-tomcat-connectors/jk/native2/server/apache2/jk_logger_apache2.c Index: jk_logger_apache2.c === /* = * * * * The Apache Software License, Version 1.1 * * * * Copyright (c) 1999-2001 The Apache Software Foundation. * * All rights reserved.* * * * = * * * * Redistribution and use in source and binary forms, with or without modi- * * fication, are permitted provided that the following conditions are met: * * * * 1. Redistributions of source code must retain the above copyright notice * *notice, this list of conditions and the following disclaimer. * * * * 2. Redistributions in binary form must reproduce the above copyright * *notice, this list of conditions and the following disclaimer in the * *documentation and/or other materials provided with the distribution. * * * * 3. The end-user documentation included with the redistribution, if any, * *must include the following acknowlegement: * * * * This product includes software developed by the Apache Software * *Foundation http://www.apache.org/. * * * *Alternately, this acknowlegement may appear in the software itself, if * *and wherever such third-party acknowlegements normally appear. * * * * 4. The names The Jakarta Project, Jk, and Apache Software * *Foundation must not be used to endorse or promote products derived * *from this software without prior written permission. For written * *permission, please contact [EMAIL PROTECTED].* * * * 5. Products derived from this software may not be called Apache nor may * *Apache appear in their names without prior written permission of the * *Apache Software Foundation.* * * * THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESSED OR IMPLIED WARRANTIES * * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * * THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY * * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * * = * * * * This software consists of voluntary contributions made by many indivi- * * duals on behalf of the Apache Software Foundation. For more