Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic_ack.c @ 8761:225e9f1dfe7c quic
QUIC: renamed stream variables from sn to qs.
Currently both names are used which is confusing. Historically these were
different objects, but now it's the same one. The name qs (quic stream) makes
more sense than sn (stream node).
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 19 Apr 2021 17:25:56 +0300 |
parents | baf9551b4a5b |
children | 4117aa7fa38e |
comparison
equal
deleted
inserted
replaced
8760:baf9551b4a5b | 8761:225e9f1dfe7c |
---|---|
434 { | 434 { |
435 size_t n; | 435 size_t n; |
436 ngx_buf_t *b; | 436 ngx_buf_t *b; |
437 ngx_queue_t *q; | 437 ngx_queue_t *q; |
438 ngx_quic_frame_t *f, *start; | 438 ngx_quic_frame_t *f, *start; |
439 ngx_quic_stream_t *sn; | 439 ngx_quic_stream_t *qs; |
440 ngx_quic_connection_t *qc; | 440 ngx_quic_connection_t *qc; |
441 | 441 |
442 qc = ngx_quic_get_connection(c); | 442 qc = ngx_quic_get_connection(c); |
443 q = ngx_queue_head(&ctx->sent); | 443 q = ngx_queue_head(&ctx->sent); |
444 start = ngx_queue_data(q, ngx_quic_frame_t, queue); | 444 start = ngx_queue_data(q, ngx_quic_frame_t, queue); |
488 : qc->streams.client_max_streams_uni; | 488 : qc->streams.client_max_streams_uni; |
489 ngx_quic_queue_frame(qc, f); | 489 ngx_quic_queue_frame(qc, f); |
490 break; | 490 break; |
491 | 491 |
492 case NGX_QUIC_FT_MAX_STREAM_DATA: | 492 case NGX_QUIC_FT_MAX_STREAM_DATA: |
493 sn = ngx_quic_find_stream(&qc->streams.tree, | 493 qs = ngx_quic_find_stream(&qc->streams.tree, |
494 f->u.max_stream_data.id); | 494 f->u.max_stream_data.id); |
495 if (sn == NULL) { | 495 if (qs == NULL) { |
496 ngx_quic_free_frame(c, f); | 496 ngx_quic_free_frame(c, f); |
497 break; | 497 break; |
498 } | 498 } |
499 | 499 |
500 b = sn->b; | 500 b = qs->b; |
501 n = sn->fs->received + (b->pos - b->start) + (b->end - b->last); | 501 n = qs->fs->received + (b->pos - b->start) + (b->end - b->last); |
502 | 502 |
503 if (f->u.max_stream_data.limit < n) { | 503 if (f->u.max_stream_data.limit < n) { |
504 f->u.max_stream_data.limit = n; | 504 f->u.max_stream_data.limit = n; |
505 } | 505 } |
506 | 506 |
513 case NGX_QUIC_FT_STREAM3: | 513 case NGX_QUIC_FT_STREAM3: |
514 case NGX_QUIC_FT_STREAM4: | 514 case NGX_QUIC_FT_STREAM4: |
515 case NGX_QUIC_FT_STREAM5: | 515 case NGX_QUIC_FT_STREAM5: |
516 case NGX_QUIC_FT_STREAM6: | 516 case NGX_QUIC_FT_STREAM6: |
517 case NGX_QUIC_FT_STREAM7: | 517 case NGX_QUIC_FT_STREAM7: |
518 sn = ngx_quic_find_stream(&qc->streams.tree, f->u.stream.stream_id); | 518 qs = ngx_quic_find_stream(&qc->streams.tree, f->u.stream.stream_id); |
519 | 519 |
520 if (sn && sn->connection->write->error) { | 520 if (qs && qs->connection->write->error) { |
521 /* RESET_STREAM was sent */ | 521 /* RESET_STREAM was sent */ |
522 ngx_quic_free_frame(c, f); | 522 ngx_quic_free_frame(c, f); |
523 break; | 523 break; |
524 } | 524 } |
525 | 525 |