• Home
  • Raw
  • Download

Lines Matching refs:stream_data

200                        http2_stream_data *stream_data) {  in add_stream()  argument
201 stream_data->next = session_data->root.next; in add_stream()
202 session_data->root.next = stream_data; in add_stream()
203 stream_data->prev = &session_data->root; in add_stream()
204 if (stream_data->next) { in add_stream()
205 stream_data->next->prev = stream_data; in add_stream()
210 http2_stream_data *stream_data) { in remove_stream() argument
213 stream_data->prev->next = stream_data->next; in remove_stream()
214 if (stream_data->next) { in remove_stream()
215 stream_data->next->prev = stream_data->prev; in remove_stream()
221 http2_stream_data *stream_data; in create_http2_stream_data() local
222 stream_data = malloc(sizeof(http2_stream_data)); in create_http2_stream_data()
223 memset(stream_data, 0, sizeof(http2_stream_data)); in create_http2_stream_data()
224 stream_data->stream_id = stream_id; in create_http2_stream_data()
225 stream_data->fd = -1; in create_http2_stream_data()
227 add_stream(session_data, stream_data); in create_http2_stream_data()
228 return stream_data; in create_http2_stream_data()
231 static void delete_http2_stream_data(http2_stream_data *stream_data) { in delete_http2_stream_data() argument
232 if (stream_data->fd != -1) { in delete_http2_stream_data()
233 close(stream_data->fd); in delete_http2_stream_data()
235 free(stream_data->request_path); in delete_http2_stream_data()
236 free(stream_data); in delete_http2_stream_data()
270 http2_stream_data *stream_data; in delete_http2_session_data() local
278 for (stream_data = session_data->root.next; stream_data;) { in delete_http2_session_data()
279 http2_stream_data *next = stream_data->next; in delete_http2_session_data()
280 delete_http2_stream_data(stream_data); in delete_http2_session_data()
281 stream_data = next; in delete_http2_session_data()
434 http2_stream_data *stream_data) { in error_reply() argument
444 stream_data->stream_id, in error_reply()
461 stream_data->fd = pipefd[0]; in error_reply()
463 if (send_response(session, stream_data->stream_id, hdrs, ARRLEN(hdrs), in error_reply()
477 http2_stream_data *stream_data; in on_header_callback() local
487 stream_data = in on_header_callback()
489 if (!stream_data || stream_data->request_path) { in on_header_callback()
496 stream_data->request_path = percent_decode(value, j); in on_header_callback()
507 http2_stream_data *stream_data; in on_begin_headers_callback() local
513 stream_data = create_http2_stream_data(session_data, frame->hd.stream_id); in on_begin_headers_callback()
515 stream_data); in on_begin_headers_callback()
530 http2_stream_data *stream_data) { in on_request_recv() argument
535 if (!stream_data->request_path) { in on_request_recv()
536 if (error_reply(session, stream_data) != 0) { in on_request_recv()
542 stream_data->request_path); in on_request_recv()
543 if (!check_path(stream_data->request_path)) { in on_request_recv()
544 if (error_reply(session, stream_data) != 0) { in on_request_recv()
549 for (rel_path = stream_data->request_path; *rel_path == '/'; ++rel_path) in on_request_recv()
553 if (error_reply(session, stream_data) != 0) { in on_request_recv()
558 stream_data->fd = fd; in on_request_recv()
560 if (send_response(session, stream_data->stream_id, hdrs, ARRLEN(hdrs), fd) != in on_request_recv()
571 http2_stream_data *stream_data; in on_frame_recv_callback() local
577 stream_data = in on_frame_recv_callback()
581 if (!stream_data) { in on_frame_recv_callback()
584 return on_request_recv(session, session_data, stream_data); in on_frame_recv_callback()
596 http2_stream_data *stream_data; in on_stream_close_callback() local
599 stream_data = nghttp2_session_get_stream_user_data(session, stream_id); in on_stream_close_callback()
600 if (!stream_data) { in on_stream_close_callback()
603 remove_stream(session_data, stream_data); in on_stream_close_callback()
604 delete_http2_stream_data(stream_data); in on_stream_close_callback()