| 179 | } |
| 180 | |
| 181 | static apr_size_t assure_scratch_space(h2_c1_io *io) { |
| 182 | apr_size_t remain = io->ssize - io->slen; |
| 183 | if (io->scratch && remain == 0) { |
| 184 | append_scratch(io); |
| 185 | } |
| 186 | if (!io->scratch) { |
| 187 | /* we control the size and it is larger than what buckets usually |
| 188 | * allocate. */ |
| 189 | io->scratch = apr_bucket_alloc(io->write_size, io->session->c1->bucket_alloc); |
| 190 | io->ssize = io->write_size; |
| 191 | io->slen = 0; |
| 192 | remain = io->ssize; |
| 193 | } |
| 194 | return remain; |
| 195 | } |
| 196 | |
| 197 | static apr_status_t read_to_scratch(h2_c1_io *io, apr_bucket *b) |
| 198 | { |
no test coverage detected