diff 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
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_ack.c
+++ b/src/event/quic/ngx_event_quic_ack.c
@@ -436,7 +436,7 @@ ngx_quic_resend_frames(ngx_connection_t 
     ngx_buf_t              *b;
     ngx_queue_t            *q;
     ngx_quic_frame_t       *f, *start;
-    ngx_quic_stream_t      *sn;
+    ngx_quic_stream_t      *qs;
     ngx_quic_connection_t  *qc;
 
     qc = ngx_quic_get_connection(c);
@@ -490,15 +490,15 @@ ngx_quic_resend_frames(ngx_connection_t 
             break;
 
         case NGX_QUIC_FT_MAX_STREAM_DATA:
-            sn = ngx_quic_find_stream(&qc->streams.tree,
+            qs = ngx_quic_find_stream(&qc->streams.tree,
                                       f->u.max_stream_data.id);
-            if (sn == NULL) {
+            if (qs == NULL) {
                 ngx_quic_free_frame(c, f);
                 break;
             }
 
-            b = sn->b;
-            n = sn->fs->received + (b->pos - b->start) + (b->end - b->last);
+            b = qs->b;
+            n = qs->fs->received + (b->pos - b->start) + (b->end - b->last);
 
             if (f->u.max_stream_data.limit < n) {
                 f->u.max_stream_data.limit = n;
@@ -515,9 +515,9 @@ ngx_quic_resend_frames(ngx_connection_t 
         case NGX_QUIC_FT_STREAM5:
         case NGX_QUIC_FT_STREAM6:
         case NGX_QUIC_FT_STREAM7:
-            sn = ngx_quic_find_stream(&qc->streams.tree, f->u.stream.stream_id);
+            qs = ngx_quic_find_stream(&qc->streams.tree, f->u.stream.stream_id);
 
-            if (sn && sn->connection->write->error) {
+            if (qs && qs->connection->write->error) {
                 /* RESET_STREAM was sent */
                 ngx_quic_free_frame(c, f);
                 break;