| 348 | } |
| 349 | |
| 350 | apr_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 | |
| 375 | apr_status_t h2_c1_io_append(h2_c1_io *io, apr_bucket_brigade *bb) |
| 376 | { |
no test coverage detected