MCPcopy Create free account
hub / github.com/apache/httpd / ajp_msg_peek_uint16

Function ajp_msg_peek_uint16

modules/proxy/ajp_msg.c:442–455  ·  view source on GitHub ↗

* Peek a 16bits 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 */

Source from the content-addressed store, hash-verified

440 * @return APR_SUCCESS or error
441 */
442apr_status_t ajp_msg_peek_uint16(ajp_msg_t *msg, apr_uint16_t *rvalue)
443{
444 apr_uint16_t value;
445
446 if ((msg->pos + 1) >= msg->len) {
447 return ajp_log_overflow(msg, "ajp_msg_peek_uint16");
448 }
449
450 value = ((msg->buf[(msg->pos)] & 0xFF) << 8);
451 value += ((msg->buf[(msg->pos + 1)] & 0xFF));
452
453 *rvalue = value;
454 return APR_SUCCESS;
455}
456
457/**
458 * Peek a 8bits unsigned value from AJP Message, position in message

Callers 1

ajp_unmarshal_responseFunction · 0.85

Calls 1

ajp_log_overflowFunction · 0.85

Tested by

no test coverage detected