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

Function wait_not_empty

modules/http2/h2_bucket_beam.c:195–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195static apr_status_t wait_not_empty(h2_bucket_beam *beam, conn_rec *c, apr_read_type_e block)
196{
197 apr_status_t rv = APR_SUCCESS;
198
199 while (buffer_is_empty(beam) && APR_SUCCESS == rv) {
200 if (beam->aborted) {
201 rv = APR_ECONNABORTED;
202 }
203 else if (beam->closed) {
204 rv = APR_EOF;
205 }
206 else if (APR_BLOCK_READ != block) {
207 rv = APR_EAGAIN;
208 }
209 else if (beam->timeout > 0) {
210 H2_BEAM_LOG(beam, c, APLOG_TRACE2, rv, "wait_not_empty, timeout", NULL);
211 rv = apr_thread_cond_timedwait(beam->change, beam->lock, beam->timeout);
212 }
213 else {
214 H2_BEAM_LOG(beam, c, APLOG_TRACE2, rv, "wait_not_empty, forever", NULL);
215 rv = apr_thread_cond_wait(beam->change, beam->lock);
216 }
217 }
218 return rv;
219}
220
221static apr_status_t wait_not_full(h2_bucket_beam *beam, conn_rec *c,
222 apr_read_type_e block,

Callers 1

h2_beam_receiveFunction · 0.85

Calls 1

buffer_is_emptyFunction · 0.85

Tested by

no test coverage detected