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

Function ajp_msg_get_uint16

modules/proxy/ajp_msg.c:419–432  ·  view source on GitHub ↗

* Get a 16bits unsigned value from AJP Message * * @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

417 * @return APR_SUCCESS or error
418 */
419apr_status_t ajp_msg_get_uint16(ajp_msg_t *msg, apr_uint16_t *rvalue)
420{
421 apr_uint16_t value;
422
423 if ((msg->pos + 1) >= msg->len) {
424 return ajp_log_overflow(msg, "ajp_msg_get_uint16");
425 }
426
427 value = ((msg->buf[(msg->pos++)] & 0xFF) << 8);
428 value += ((msg->buf[(msg->pos++)] & 0xFF));
429
430 *rvalue = value;
431 return APR_SUCCESS;
432}
433
434/**
435 * Peek a 16bits unsigned value from AJP Message, position in message

Callers 4

ajp_unmarshal_responseFunction · 0.85
ajp_parse_dataFunction · 0.85
ajp_msg_get_stringFunction · 0.85
ajp_msg_get_bytesFunction · 0.85

Calls 1

ajp_log_overflowFunction · 0.85

Tested by

no test coverage detected