| 411 | } |
| 412 | |
| 413 | static int send_response_fd(nghttp2_session *session, int32_t stream_id, |
| 414 | nghttp2_nv *nva, size_t nvlen, int fd) { |
| 415 | int rv; |
| 416 | nghttp2_data_provider2 data_prd; |
| 417 | |
| 418 | data_prd.source.fd = fd; |
| 419 | data_prd.read_callback = file_read_callback; |
| 420 | |
| 421 | rv = nghttp2_submit_response2(session, stream_id, nva, nvlen, |
| 422 | fd > 0 ? &data_prd : NULL); |
| 423 | if (rv != 0) { |
| 424 | LM_WARN("Fatal error: %s", nghttp2_strerror(rv)); |
| 425 | return -1; |
| 426 | } |
| 427 | |
| 428 | return 0; |
| 429 | } |
| 430 | |
| 431 | static int send_response_empty(nghttp2_session *session, int32_t stream_id, |
| 432 | nghttp2_nv *nva, size_t nvlen) { |
no outgoing calls
no test coverage detected