| 224 | } |
| 225 | |
| 226 | static apr_status_t input_flush(h2_stream *stream) |
| 227 | { |
| 228 | apr_status_t status = APR_SUCCESS; |
| 229 | apr_off_t written; |
| 230 | |
| 231 | if (input_buffer_is_empty(stream)) goto cleanup; |
| 232 | |
| 233 | ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, stream->session->c1, |
| 234 | H2_STRM_MSG(stream, "flush input")); |
| 235 | status = h2_beam_send(stream->input, stream->session->c1, |
| 236 | stream->in_buffer, APR_BLOCK_READ, &written); |
| 237 | stream->in_last_write = apr_time_now(); |
| 238 | if (APR_SUCCESS != status && h2_stream_is_at(stream, H2_SS_CLOSED_L)) { |
| 239 | ap_log_cerror(APLOG_MARK, APLOG_TRACE2, status, stream->session->c1, |
| 240 | H2_STRM_MSG(stream, "send input error")); |
| 241 | h2_stream_dispatch(stream, H2_SEV_IN_ERROR); |
| 242 | } |
| 243 | cleanup: |
| 244 | return status; |
| 245 | } |
| 246 | |
| 247 | static void input_append_bucket(h2_stream *stream, apr_bucket *b) |
| 248 | { |
no test coverage detected