jfclere     2004/07/29 01:47:49

  Modified:    ajp/ajplib/test ajp_msg.c
  Log:
  Add ajp_msg_peek_byte() to read the type of the response.
  
  Revision  Changes    Path
  1.9       +24 -0     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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ajp_msg.c 28 Jul 2004 18:13:11 -0000      1.8
  +++ ajp_msg.c 29 Jul 2004 08:47:49 -0000      1.9
  @@ -411,6 +411,30 @@
   }
   
   /**
  + * Peek a 8bits unsigned value from AJP Message, position in message
  + * is not updated
  + *
  + * @param msg       AJP Message to get value from
  + * @param rvalue    Pointer where value will be returned
  + * @return          APR_SUCCESS or error
  + */
  +apr_status_t ajp_msg_peek_byte(ajp_msg_t *msg, apr_byte_t *rvalue)
  +{
  +    apr_uint16_t value;
  +
  +    if (msg->pos > msg->len) {
  +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, NULL,
  +                      "ajp_msg_peek_byte(): BufferOverflowException %d %d",
  +                      msg->pos, msg->len);
  +
  +        return AJP_EOVERFLOW;
  +    }
  +    
  +    *rvalue = msg->buf[msg->pos];
  +    return APR_SUCCESS;
  +}
  +
  +/**
    * Get a 8bits unsigned value from AJP Message
    *
    * @param msg       AJP Message to get value from
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to