MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / send_response_fd

Function send_response_fd

modules/http2d/server.c:413–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413static 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
431static int send_response_empty(nghttp2_session *session, int32_t stream_id,
432 nghttp2_nv *nva, size_t nvlen) {

Callers 2

error_replyFunction · 0.85
on_request_recvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected