costin 01/12/01 17:00:00 Modified: jk/native2/common jk_ajp_common.c jk_ajp_common.h jk_ajp14.c Log: Update jk_log. Few more fixes to complete the move to jk_channel. Changed ajp_worker_t worker to a pointer ( it was very confusing ) Revision Changes Path 1.3 +8 -9 jakarta-tomcat-connectors/jk/native2/common/jk_ajp_common.c Index: jk_ajp_common.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_ajp_common.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- jk_ajp_common.c 2001/12/01 22:52:06 1.2 +++ jk_ajp_common.c 2001/12/02 01:00:00 1.3 @@ -59,7 +59,7 @@ * Description: common stuff for bi-directional protocols ajp13/ajp14. * * Author: Gal Shachor <[EMAIL PROTECTED]> * * Author: Henri Gomez <[EMAIL PROTECTED]> * - * Version: $Revision: 1.2 $ * + * Version: $Revision: 1.3 $ * ***************************************************************************/ @@ -67,7 +67,6 @@ #include "jk_util.h" #include "jk_ajp_common.h" #include "jk_ajp14.h" -#include "jk_connect.h" #include "jk_channel.h" #include "jk_env.h" @@ -553,7 +552,7 @@ jk_close_pool(&(ae->pool)); { - jk_channel_t *channel=ae->worker->worker.channel; + jk_channel_t *channel=ae->worker->worker->channel; int err=channel->close( channel, &ae->endpoint ); } free(ae); @@ -565,7 +564,7 @@ unsigned attempt; for(attempt = 0 ; attempt < ae->worker->connect_retry_attempts ; attempt++) { - jk_channel_t *channel=ae->worker->worker.channel; + jk_channel_t *channel=ae->worker->worker->channel; int err=channel->open( channel, &ae->endpoint ); l->jkLog(l, JK_LOG_DEBUG, "ajp_connect_to_endpoint: connected %lx\n", &ae->endpoint ); if( err == JK_TRUE ) { @@ -593,7 +592,7 @@ jk_dump_buff(l, JK_LOG_DEBUG, "sending to ajp13", msg); { int err; - jk_channel_t *channel=ae->worker->worker.channel; + jk_channel_t *channel=ae->worker->worker->channel; err=channel->send( channel, &ae->endpoint, jk_b_get_buff(msg), jk_b_get_len(msg) ); @@ -624,7 +623,7 @@ return JK_FALSE; } { - jk_channel_t *channel=ae->worker->worker.channel; + jk_channel_t *channel=ae->worker->worker->channel; rc=channel->recv( channel, &ae->endpoint, head, AJP_HEADER_LEN ); @@ -655,7 +654,7 @@ jk_b_set_pos(msg, 0); { - jk_channel_t *channel=ae->worker->worker.channel; + jk_channel_t *channel=ae->worker->worker->channel; rc=channel->recv( channel, &ae->endpoint, jk_b_get_buff(msg), msglen); @@ -793,7 +792,7 @@ * First try to reuse open connections... */ { - jk_channel_t *channel=ae->worker->worker.channel; + jk_channel_t *channel=ae->worker->worker->channel; err=ajp_connection_tcp_send_message(ae, op->request, l); if( err != JK_TRUE ) { l->jkLog(l, JK_LOG_ERROR, "Error sending request, close endpoint\n"); @@ -1138,7 +1137,7 @@ } /* Try again to connect */ { - jk_channel_t *channel=p->worker->worker.channel; + jk_channel_t *channel=p->worker->worker->channel; l->jkLog(l, JK_LOG_ERROR, "Error sending request, reconnect\n"); err=channel->close( channel, &p->endpoint ); 1.2 +3 -3 jakarta-tomcat-connectors/jk/native2/common/jk_ajp_common.h Index: jk_ajp_common.h =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_ajp_common.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_ajp_common.h 2001/12/01 22:40:10 1.1 +++ jk_ajp_common.h 2001/12/02 01:00:00 1.2 @@ -59,7 +59,7 @@ * Description: common stuff for bi-directional protocol ajp13/ajp14. * * Author: Gal Shachor <[EMAIL PROTECTED]> * * Author: Henri Gomez <[EMAIL PROTECTED]> * - * Version: $Revision: 1.1 $ * + * Version: $Revision: 1.2 $ * ***************************************************************************/ #ifndef JK_AJP_COMMON_H @@ -323,8 +323,8 @@ jk_login_service_t *login; - jk_worker_t worker; - + jk_worker_t *worker; + /* * Post physical connect handler. * AJP14 will set here its login handler 1.2 +8 -8 jakarta-tomcat-connectors/jk/native2/common/jk_ajp14.c Index: jk_ajp14.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_ajp14.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_ajp14.c 2001/12/01 22:38:39 1.1 +++ jk_ajp14.c 2001/12/02 01:00:00 1.2 @@ -59,7 +59,7 @@ /*************************************************************************** * Description: Next generation bi-directional protocol handler. * * Author: Henri Gomez <[EMAIL PROTECTED]> * - * Version: $Revision: 1.1 $ * + * Version: $Revision: 1.2 $ * ***************************************************************************/ @@ -84,7 +84,7 @@ jk_login_service_t *s, jk_logger_t *l) { - jk_log(l, JK_LOG_DEBUG, "Into ajp14_marshal_shutdown_into_msgb\n"); + l->jkLog(l, JK_LOG_DEBUG, "Into ajp14_marshal_shutdown_into_msgb\n"); /* To be on the safe side */ jk_b_reset(msg); @@ -99,7 +99,7 @@ * COMPUTED-SEED */ if (jk_b_append_bytes(msg, (const unsigned char *)s->computed_key, AJP14_COMPUTED_KEY_LEN)) { - jk_log(l, JK_LOG_ERROR, "Error ajp14_marshal_shutdown_into_msgb - Error appending the COMPUTED MD5 bytes\n"); + l->jkLog(l, JK_LOG_ERROR, "Error ajp14_marshal_shutdown_into_msgb - Error appending the COMPUTED MD5 bytes\n"); return JK_FALSE; } @@ -119,16 +119,16 @@ { unsigned long status; - jk_log(l, JK_LOG_DEBUG, "Into ajp14_unmarshal_shutdown_nok\n"); + l->jkLog(l, JK_LOG_DEBUG, "Into ajp14_unmarshal_shutdown_nok\n"); status = jk_b_get_long(msg); if (status == 0xFFFFFFFF) { - jk_log(l, JK_LOG_ERROR, "Error ajp14_unmarshal_shutdown_nok - can't get failure code\n"); + l->jkLog(l, JK_LOG_ERROR, "Error ajp14_unmarshal_shutdown_nok - can't get failure code\n"); return JK_FALSE; } - jk_log(l, JK_LOG_INFO, "Can't shutdown servlet engine - code %08lx", status); + l->jkLog(l, JK_LOG_INFO, "Can't shutdown servlet engine - code %08lx", status); return JK_TRUE; } @@ -145,7 +145,7 @@ jk_msg_buf_t *unk, jk_logger_t *l) { - jk_log(l, JK_LOG_DEBUG, "Into ajp14_marshal_unknown_packet_into_msgb\n"); + l->jkLog(l, JK_LOG_DEBUG, "Into ajp14_marshal_unknown_packet_into_msgb\n"); /* To be on the safe side */ jk_b_reset(msg); @@ -167,7 +167,7 @@ * ( ie: only 1k max ) */ if (jk_b_append_bytes(msg, jk_b_get_buff(unk), jk_b_get_len(unk))) { - jk_log(l, JK_LOG_ERROR, "Error ajp14_marshal_unknown_packet_into_msgb - Error appending the UNHANDLED MESSAGE\n"); + l->jkLog(l, JK_LOG_ERROR, "Error ajp14_marshal_unknown_packet_into_msgb - Error appending the UNHANDLED MESSAGE\n"); return JK_FALSE; }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>