mturk 2004/07/29 23:32:54
Modified:ajp/ajplib/test ajp_header.c ajp.h
Log:
Change the casting from void* to msg*. We don't need that, cause
the ajp_msg_t is public.
Revision ChangesPath
1.15 +8 -16 jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c
Index: ajp_header.c
===
RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp_header.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- ajp_header.c 30 Jul 2004 06:27:57 - 1.14
+++ ajp_header.c 30 Jul 2004 06:32:54 - 1.15
@@ -734,38 +734,34 @@
*/
apr_status_t ajp_read_header(apr_socket_t *sock,
request_rec *r,
- void **data)
+ ajp_msg_t **msg)
{
apr_byte_t result;
-ajp_msg_t *msg;
apr_status_t rc;
-rc = ajp_msg_create(r-pool, msg);
+rc = ajp_msg_create(r-pool, msg);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
ajp_read_header: ajp_msg_create failed);
return rc;
}
-ajp_msg_reset(msg);
-rc = ajp_ilink_receive(sock, msg);
+ajp_msg_reset(*msg);
+rc = ajp_ilink_receive(sock, *msg);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
ajp_read_header: ajp_ilink_receive failed);
return rc;
}
-rc = ajp_msg_peek_byte(msg, result);
+rc = ajp_msg_peek_byte(*msg, result);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
ajp_read_header: ajp_ilink_received %02x, result);
-*data = msg;
return APR_SUCCESS;
}
/* parse the msg to read the type */
-int ajp_parse_type(request_rec *r, void *data)
+int ajp_parse_type(request_rec *r, ajp_msg_t *msg)
{
apr_byte_t result;
-ajp_msg_t *msg;
-msg = (ajp_msg_t *)data;
ajp_msg_peek_byte(msg, result);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
ajp_parse_type: got %02x, result);
@@ -773,13 +769,11 @@
}
/* parse the headers */
-apr_status_t ajp_parse_headers(request_rec *r, void *data)
+apr_status_t ajp_parse_headers(request_rec *r, ajp_msg_t *msg)
{
-ajp_msg_t *msg;
apr_byte_t result;
apr_status_t rc;
-msg = (ajp_msg_t *)data;
rc = ajp_msg_get_byte(msg, result);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
@@ -795,14 +789,12 @@
}
/* parse the header and return data address and length */
-apr_status_t ajp_parse_data(request_rec *r, void *data, apr_uint16_t *len,
+apr_status_t ajp_parse_data(request_rec *r, ajp_msg_t *msg, apr_uint16_t *len,
char **ptr)
{
-ajp_msg_t *msg;
apr_byte_t result;
apr_status_t rc;
-msg = (ajp_msg_t *)data;
rc = ajp_msg_get_byte(msg, result);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r-server,
1.17 +2 -2 jakarta-tomcat-connectors/ajp/ajplib/test/ajp.h
Index: ajp.h
===
RCS file: /home/cvs/jakarta-tomcat-connectors/ajp/ajplib/test/ajp.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ajp.h 30 Jul 2004 06:27:09 - 1.16
+++ ajp.h 30 Jul 2004 06:32:54 - 1.17
@@ -352,12 +352,12 @@
* Read the ajp message and return the type of the message.
* @param sock backend socket
* @param r current request
- * @param data return data
+ * @param msg returned AJP message
* @return APR_SUCCESS or error
*/
apr_status_t ajp_read_header(apr_socket_t *sock,
request_rec *r,
- void **data);
+ void **msg);
#endif /* AJP_H */
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]