jfclere 2004/07/29 03:10:21 Modified: ajp/ajplib/test ajp_link.c ajp_logon.c ajp_msg.c Log: ap_log_rerror needs a request otherwise it cores, so use ap_log_error. Revision Changes Path 1.7 +8 -8 jakarta-tomcat-connectors/ajp/ajplib/test/ajp_link.c Index: ajp_link.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp_link.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ajp_link.c 28 Jul 2004 17:43:17 -0000 1.6 +++ ajp_link.c 29 Jul 2004 10:10:20 -0000 1.7 @@ -23,7 +23,7 @@ apr_size_t length; if (sock == NULL) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_ilink_send(): NULL socket provided"); return AJP_EINVAL; } @@ -38,7 +38,7 @@ status = apr_socket_send(sock, buf, &written); if (status != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, status, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL, "ajp_ilink_send(): send failed"); return status; } @@ -58,7 +58,7 @@ apr_size_t rdlen; if (sock == NULL) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_ilink_readN(): NULL socket provided"); return AJP_EINVAL; } @@ -91,7 +91,7 @@ apr_size_t blen; if (sock == NULL) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_ilink_receive(): NULL socket provided"); return AJP_EINVAL; } @@ -101,7 +101,7 @@ status = ilink_read(sock, msg->buf, hlen); if (status != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, status, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL, "ajp_ilink_receive() can't receive header\n"); return AJP_ENO_HEADER; } @@ -109,7 +109,7 @@ status = ajp_msg_check_header(msg, &blen); if (status != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_ilink_receive() received bad header\n"); return AJP_EBAD_HEADER; } @@ -117,13 +117,13 @@ status = ilink_read(sock, msg->buf + hlen, blen); if (status != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, status, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL, "ajp_ilink_receive() error while receiving message body %of length %d\n", hlen); return AJP_EBAD_MESSAGE; } - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "ajp_ilink_receive() received packet len=%d type=%d\n", blen, (int)msg->buf[hlen]); 1.5 +8 -8 jakarta-tomcat-connectors/ajp/ajplib/test/ajp_logon.c Index: ajp_logon.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp_logon.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ajp_logon.c 29 Jul 2004 08:07:23 -0000 1.4 +++ ajp_logon.c 29 Jul 2004 10:10:21 -0000 1.5 @@ -86,7 +86,7 @@ status = ajp_msg_get_string(msg, &entropy); if (status != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_handle_login(): can't get seed"); return AJP_ELOGFAIL; @@ -108,7 +108,7 @@ status = ajp_msg_append_uint8(msg, AJP14_LOGCOMP_CMD); if (status != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_handle_login(): can't log command"); return AJP_ELOGFAIL; @@ -118,7 +118,7 @@ status = ajp_msg_append_string(msg, computedKey); if (status != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_handle_login(): can't serialize computed secret"); return AJP_ELOGFAIL; @@ -128,7 +128,7 @@ status = ajp_msg_append_uint32(msg, AJP14_CONTEXT_INFO_NEG | AJP14_PROTO_SUPPORT_AJP14_NEG); if (status != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_handle_login(): can't append negociation header"); return AJP_ELOGFAIL; @@ -138,7 +138,7 @@ status = ajp_msg_append_string(msg, servername); if (status != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_handle_login(): can't serialize server name"); return AJP_ELOGFAIL; @@ -164,7 +164,7 @@ status = ajp_msg_get_uint32(msg, &negociation); if (status != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_handle_logok(): can't get negociation header"); return AJP_ELOGFAIL; @@ -173,7 +173,7 @@ status = ajp_msg_get_string(msg, &server_name); if (status != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_handle_logok(): can't get servlet engine name"); return AJP_ELOGFAIL; @@ -200,7 +200,7 @@ status = ajp_msg_get_uint32(msg, &failurecode); if (status != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_handle_lognok(): can't get failure code"); return AJP_ELOGFAIL; 1.11 +20 -20 jakarta-tomcat-connectors/ajp/ajplib/test/ajp_msg.c Index: ajp_msg.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp_msg.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ajp_msg.c 29 Jul 2004 09:57:44 -0000 1.10 +++ ajp_msg.c 29 Jul 2004 10:10:21 -0000 1.11 @@ -37,7 +37,7 @@ if (len > 1024) len = 1024; - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "ajp_msg_dump(): %s pos=%d len=%d max=%d", err, msg->pos, msg->len, AJP_MSG_BUFFER_SZ); @@ -67,7 +67,7 @@ *current++ = '\0'; - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "ajp_msg_dump(): %.4x %s", i, line); } @@ -91,7 +91,7 @@ if (!((head[0] == 0x41 && head[1] == 0x42) || (head[0] == 0x12 && head[1] == 0x34))) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_check_msg_header() got bad signature %x%x", head[0], head[1]); @@ -102,7 +102,7 @@ msglen += (head[3] & 0xFF); if (msglen > AJP_MSG_BUFFER_SZ) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_check_msg_header() incoming message is too big %d, max is %d", msglen, AJP_MSG_BUFFER_SZ); return AJP_ETOBIG; @@ -166,7 +166,7 @@ apr_size_t len = msg->len; if ((len + 4) > AJP_MSG_BUFFER_SZ) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_append_uint32(): BufferOverflowException %d %d", msg->pos, msg->len); return AJP_EOVERFLOW; @@ -194,7 +194,7 @@ apr_size_t len = msg->len; if ((len + 2) > AJP_MSG_BUFFER_SZ) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_append_uint16(): BufferOverflowException %d %d", msg->pos, msg->len); return AJP_EOVERFLOW; @@ -220,7 +220,7 @@ apr_size_t len = msg->len; if ((len + 1) > AJP_MSG_BUFFER_SZ) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_append_uint8(): BufferOverflowException %d %d", msg->pos, msg->len); return AJP_EOVERFLOW; @@ -252,7 +252,7 @@ len = strlen(value); if ((msg->len + len + 2) > AJP_MSG_BUFFER_SZ) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_append_cvt_string(): BufferOverflowException %d %d", msg->pos, msg->len); return AJP_EOVERFLOW; @@ -315,7 +315,7 @@ } if ((msg->len + valuelen) > AJP_MSG_BUFFER_SZ) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_append_bytes(): BufferOverflowException %d %d", msg->pos, msg->len); return AJP_EOVERFLOW; @@ -340,7 +340,7 @@ apr_uint32_t value; if ((msg->pos + 3) > msg->len) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_get_long(): BufferOverflowException %d %d", msg->pos, msg->len); @@ -369,7 +369,7 @@ apr_uint16_t value; if ((msg->pos + 1) > msg->len) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_get_int(): BufferOverflowException %d %d", msg->pos, msg->len); @@ -396,7 +396,7 @@ apr_uint16_t value; if ((msg->pos + 1) > msg->len) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_peek_int(): BufferOverflowException %d %d", msg->pos, msg->len); @@ -421,7 +421,7 @@ apr_status_t ajp_msg_peek_byte(ajp_msg_t *msg, apr_byte_t *rvalue) { if (msg->pos > msg->len) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_peek_byte(): BufferOverflowException %d %d", msg->pos, msg->len); @@ -443,7 +443,7 @@ { if (msg->pos > msg->len) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_get_byte(): BufferOverflowException %d %d", msg->pos, msg->len); @@ -472,7 +472,7 @@ start = msg->pos; if ((status != APR_SUCCESS) || (size + start > AJP_MSG_BUFFER_SZ)) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_get_string(): BufferOverflowException %d %d", msg->pos, msg->len); @@ -507,7 +507,7 @@ start = msg->pos; if ((status != APR_SUCCESS) || (size + start > AJP_MSG_BUFFER_SZ)) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_get_bytes(): BufferOverflowException %d %d", msg->pos, msg->len); return AJP_EOVERFLOW; @@ -533,7 +533,7 @@ ajp_msg_t *msg = (ajp_msg_t *)apr_pcalloc(pool, sizeof(ajp_msg_t)); if (!msg) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_create(): can't allocate AJP message memory"); return APR_ENOPOOL; } @@ -549,7 +549,7 @@ * core dump is probably the best solution anyhow. */ if (msg->buf == NULL) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_create(): can't allocate AJP message memory"); return APR_ENOPOOL; } @@ -571,13 +571,13 @@ apr_status_t ajp_msg_copy(ajp_msg_t *smsg, ajp_msg_t *dmsg) { if (dmsg == NULL) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_copy(): destination msg is null"); return AJP_EINVAL; } if (smsg->len > AJP_MSG_BUFFER_SZ) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "ajp_msg_copy(): destination buffer too small %d, max size is %d", smsg->len, AJP_MSG_BUFFER_SZ); return AJP_ETOSMALL;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]