You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2004/07/30 08:32:54 UTC

cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c ajp.h

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  Changes    Path
  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 -0000	1.14
  +++ ajp_header.c	30 Jul 2004 06:32:54 -0000	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 -0000	1.16
  +++ ajp.h	30 Jul 2004 06:32:54 -0000	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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


RE: cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c ajp.h

Posted by Mladen Turk <mt...@apache.org>.
 

jean-frederic clere wrote: 
> > 
> > But the ajp.h is a public API for libajp, so, it should be 
> included in 
> > any project using it.
> > It has defined
> 
> OK but I want to keep the AJP things as headen as possible in 
> the proxy_ajp.c so
>   we need another include.
>

Sure thing.
Only the ajp.h will be needed.

MT.

Re: cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c ajp.h

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Mladen Turk wrote:
>  
> 
> 
>>-----Original Message-----
>>From: jean-frederic clere 
>>
>>The ideas was to prevent including of ajp.h in proxy_ajp.c 
>>Now ajp_header.c doesn't compile:
> 
> 
> 
> But the ajp.h is a public API for libajp, so, it should be included in any
> project using it.
> It has defined 

OK but I want to keep the AJP things as headen as possible in the proxy_ajp.c so 
  we need another include.

> 
> MT.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


RE: cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c ajp.h

Posted by Mladen Turk <mt...@apache.org>.
 

> -----Original Message-----
> From: jean-frederic clere 
> 
> The ideas was to prevent including of ajp.h in proxy_ajp.c 
> Now ajp_header.c doesn't compile:


But the ajp.h is a public API for libajp, so, it should be included in any
project using it.
It has defined 

MT.

Re: cvs commit: jakarta-tomcat-connectors/ajp/ajplib/test ajp_header.c ajp.h

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
mturk@apache.org wrote:
> 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.

The ideas was to prevent including of ajp.h in proxy_ajp.c
Now ajp_header.c doesn't compile:
+++
ajp_header.c:738: error: conflicting types for `ajp_read_header'
ajp.h:360: error: previous declaration of `ajp_read_header'
make: *** [ajp_header.lo] Error 1
+++

Cheers

Jean-Frederic

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org