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

Function assure_scratch_space

modules/http2/h2_c1_io.c:181–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181static 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
197static apr_status_t read_to_scratch(h2_c1_io *io, apr_bucket *b)
198{

Callers 2

h2_c1_io_add_dataFunction · 0.85
h2_c1_io_appendFunction · 0.85

Calls 1

append_scratchFunction · 0.85

Tested by

no test coverage detected