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

Function ajp_msg_append_uint16

modules/proxy/ajp_msg.c:285–299  ·  view source on GitHub ↗

* Add an unsigned 16bits value to AJP Message * * @param msg AJP Message to get value from * @param value value to add to AJP Message * @return APR_SUCCESS or error */

Source from the content-addressed store, hash-verified

283 * @return APR_SUCCESS or error
284 */
285apr_status_t ajp_msg_append_uint16(ajp_msg_t *msg, apr_uint16_t value)
286{
287 apr_size_t len = msg->len;
288
289 if ((len + 2) > msg->max_size) {
290 return ajp_log_overflow(msg, "ajp_msg_append_uint16");
291 }
292
293 msg->buf[len] = (apr_byte_t)((value >> 8) & 0xFF);
294 msg->buf[len + 1] = (apr_byte_t)(value & 0xFF);
295
296 msg->len += 2;
297
298 return APR_SUCCESS;
299}
300
301/**
302 * Add an unsigned 8bits value to AJP Message

Callers 2

ajp_marshal_into_msgbFunction · 0.85
ajp_msg_append_string_exFunction · 0.85

Calls 1

ajp_log_overflowFunction · 0.85

Tested by

no test coverage detected