Mercurial > hg > nginx
comparison src/http/ngx_http_spdy_filter_module.c @ 5508:9053fdcea4b7
SPDY: better name for queued frames counter.
No functional changes.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Tue, 14 Jan 2014 16:24:45 +0400 |
parents | 97f6cd787766 |
children | 3ff29c30effb |
comparison
equal
deleted
inserted
replaced
5507:a30bba3c72e8 | 5508:9053fdcea4b7 |
---|---|
605 } | 605 } |
606 | 606 |
607 cln->handler = ngx_http_spdy_filter_cleanup; | 607 cln->handler = ngx_http_spdy_filter_cleanup; |
608 cln->data = stream; | 608 cln->data = stream; |
609 | 609 |
610 stream->waiting = 1; | 610 stream->queued = 1; |
611 | 611 |
612 return ngx_http_spdy_filter_send(c, stream); | 612 return ngx_http_spdy_filter_send(c, stream); |
613 } | 613 } |
614 | 614 |
615 | 615 |
631 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 631 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
632 "spdy body filter \"%V?%V\"", &r->uri, &r->args); | 632 "spdy body filter \"%V?%V\"", &r->uri, &r->args); |
633 | 633 |
634 if (in == NULL || r->header_only) { | 634 if (in == NULL || r->header_only) { |
635 | 635 |
636 if (stream->waiting) { | 636 if (stream->queued) { |
637 return NGX_AGAIN; | 637 return NGX_AGAIN; |
638 } | 638 } |
639 | 639 |
640 r->connection->buffered &= ~NGX_SPDY_WRITE_BUFFERED; | 640 r->connection->buffered &= ~NGX_SPDY_WRITE_BUFFERED; |
641 | 641 |
693 return NGX_ERROR; | 693 return NGX_ERROR; |
694 } | 694 } |
695 | 695 |
696 ngx_http_spdy_queue_frame(stream->connection, frame); | 696 ngx_http_spdy_queue_frame(stream->connection, frame); |
697 | 697 |
698 stream->waiting++; | 698 stream->queued++; |
699 | 699 |
700 r->main->blocked++; | 700 r->main->blocked++; |
701 | 701 |
702 return ngx_http_spdy_filter_send(r->connection, stream); | 702 return ngx_http_spdy_filter_send(r->connection, stream); |
703 } | 703 } |
798 return NGX_ERROR; | 798 return NGX_ERROR; |
799 } | 799 } |
800 | 800 |
801 stream->blocked = 0; | 801 stream->blocked = 0; |
802 | 802 |
803 if (stream->waiting) { | 803 if (stream->queued) { |
804 fc->buffered |= NGX_SPDY_WRITE_BUFFERED; | 804 fc->buffered |= NGX_SPDY_WRITE_BUFFERED; |
805 fc->write->delayed = 1; | 805 fc->write->delayed = 1; |
806 return NGX_AGAIN; | 806 return NGX_AGAIN; |
807 } | 807 } |
808 | 808 |
930 } | 930 } |
931 | 931 |
932 frame->free = stream->free_frames; | 932 frame->free = stream->free_frames; |
933 stream->free_frames = frame; | 933 stream->free_frames = frame; |
934 | 934 |
935 stream->waiting--; | 935 stream->queued--; |
936 } | 936 } |
937 | 937 |
938 | 938 |
939 static ngx_inline void | 939 static ngx_inline void |
940 ngx_http_spdy_handle_stream(ngx_http_spdy_connection_t *sc, | 940 ngx_http_spdy_handle_stream(ngx_http_spdy_connection_t *sc, |
963 ngx_http_spdy_stream_t *stream = data; | 963 ngx_http_spdy_stream_t *stream = data; |
964 | 964 |
965 ngx_http_request_t *r; | 965 ngx_http_request_t *r; |
966 ngx_http_spdy_out_frame_t *frame, **fn; | 966 ngx_http_spdy_out_frame_t *frame, **fn; |
967 | 967 |
968 if (stream->waiting == 0) { | 968 if (stream->queued == 0) { |
969 return; | 969 return; |
970 } | 970 } |
971 | 971 |
972 r = stream->request; | 972 r = stream->request; |
973 | 973 |
980 break; | 980 break; |
981 } | 981 } |
982 | 982 |
983 if (frame->stream == stream && !frame->blocked) { | 983 if (frame->stream == stream && !frame->blocked) { |
984 | 984 |
985 stream->waiting--; | 985 stream->queued--; |
986 r->blocked--; | 986 r->blocked--; |
987 | 987 |
988 *fn = frame->next; | 988 *fn = frame->next; |
989 continue; | 989 continue; |
990 } | 990 } |