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

Function ajp_msg_append_bytes

modules/proxy/ajp_msg.c:369–385  ·  view source on GitHub ↗

* Add a Byte array to AJP Message * * @param msg AJP Message to get value from * @param value Pointer to Byte array * @param valuelen Byte array len * @return APR_SUCCESS or error */

Source from the content-addressed store, hash-verified

367 * @return APR_SUCCESS or error
368 */
369apr_status_t ajp_msg_append_bytes(ajp_msg_t *msg, const apr_byte_t *value,
370 apr_size_t valuelen)
371{
372 if (! valuelen) {
373 return APR_SUCCESS; /* Shouldn't we indicate an error ? */
374 }
375
376 if ((msg->len + valuelen) > msg->max_size) {
377 return ajp_log_overflow(msg, "ajp_msg_append_bytes");
378 }
379
380 /* We checked for space !! */
381 memcpy(msg->buf + msg->len, value, valuelen);
382 msg->len += valuelen;
383
384 return APR_SUCCESS;
385}
386
387/**
388 * Get a 32bits unsigned value from AJP Message

Callers

nothing calls this directly

Calls 1

ajp_log_overflowFunction · 0.85

Tested by

no test coverage detected