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

Function h2_c1_io_add_data

modules/http2/h2_c1_io.c:350–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350apr_status_t h2_c1_io_add_data(h2_c1_io *io, const char *data, size_t length)
351{
352 apr_status_t status = APR_SUCCESS;
353 apr_size_t remain;
354
355 ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, io->session->c1,
356 "h2_c1_io(%ld): adding %ld data bytes",
357 io->session->c1->id, (long)length);
358 while (length > 0) {
359 remain = assure_scratch_space(io);
360 if (remain >= length) {
361 memcpy(io->scratch + io->slen, data, length);
362 io->slen += length;
363 length = 0;
364 }
365 else {
366 memcpy(io->scratch + io->slen, data, remain);
367 io->slen += remain;
368 data += remain;
369 length -= remain;
370 }
371 }
372 return status;
373}
374
375apr_status_t h2_c1_io_append(h2_c1_io *io, apr_bucket_brigade *bb)
376{

Callers 2

send_cbFunction · 0.85
on_send_data_cbFunction · 0.85

Calls 1

assure_scratch_spaceFunction · 0.85

Tested by

no test coverage detected