Mercurial > hg > nginx-quic
comparison src/http/v2/ngx_http_v2_filter_module.c @ 6600:6f69e3c0f780
HTTP/2: style.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
author | Piotr Sikora <piotrsikora@google.com> |
---|---|
date | Wed, 22 Jun 2016 13:47:54 -0700 |
parents | b3b7e33083ac |
children | 699e409a3e0c |
comparison
equal
deleted
inserted
replaced
6599:191e23214dfb | 6600:6f69e3c0f780 |
---|---|
972 | 972 |
973 static ngx_http_v2_out_frame_t * | 973 static ngx_http_v2_out_frame_t * |
974 ngx_http_v2_filter_get_data_frame(ngx_http_v2_stream_t *stream, | 974 ngx_http_v2_filter_get_data_frame(ngx_http_v2_stream_t *stream, |
975 size_t len, ngx_chain_t *first, ngx_chain_t *last) | 975 size_t len, ngx_chain_t *first, ngx_chain_t *last) |
976 { | 976 { |
977 u_char flags; | 977 u_char flags; |
978 ngx_buf_t *buf; | 978 ngx_buf_t *buf; |
979 ngx_chain_t *cl; | 979 ngx_chain_t *cl; |
980 ngx_http_v2_out_frame_t *frame; | 980 ngx_http_v2_out_frame_t *frame; |
981 | |
982 | 981 |
983 frame = stream->free_frames; | 982 frame = stream->free_frames; |
984 | 983 |
985 if (frame) { | 984 if (frame) { |
986 stream->free_frames = frame->next; | 985 stream->free_frames = frame->next; |
1005 return NULL; | 1004 return NULL; |
1006 } | 1005 } |
1007 | 1006 |
1008 buf = cl->buf; | 1007 buf = cl->buf; |
1009 | 1008 |
1010 if (!buf->start) { | 1009 if (buf->start == NULL) { |
1011 buf->start = ngx_palloc(stream->request->pool, | 1010 buf->start = ngx_palloc(stream->request->pool, |
1012 NGX_HTTP_V2_FRAME_HEADER_SIZE); | 1011 NGX_HTTP_V2_FRAME_HEADER_SIZE); |
1013 if (buf->start == NULL) { | 1012 if (buf->start == NULL) { |
1014 return NULL; | 1013 return NULL; |
1015 } | 1014 } |
1180 ngx_buf_t *buf; | 1179 ngx_buf_t *buf; |
1181 ngx_chain_t *cl, *ln; | 1180 ngx_chain_t *cl, *ln; |
1182 ngx_http_v2_stream_t *stream; | 1181 ngx_http_v2_stream_t *stream; |
1183 | 1182 |
1184 stream = frame->stream; | 1183 stream = frame->stream; |
1185 | |
1186 cl = frame->first; | 1184 cl = frame->first; |
1187 | 1185 |
1188 if (cl->buf->tag == (ngx_buf_tag_t) &ngx_http_v2_module) { | 1186 if (cl->buf->tag == (ngx_buf_tag_t) &ngx_http_v2_module) { |
1189 | 1187 |
1190 if (cl->buf->pos != cl->buf->last) { | 1188 if (cl->buf->pos != cl->buf->last) { |