@@ -2142,7 +2142,7 @@ nghttp3_stream *nghttp3_conn_find_stream(nghttp3_conn *conn, |
2142 | 2142 |
|
2143 | 2143 | int nghttp3_conn_bind_control_stream(nghttp3_conn *conn, int64_t stream_id) { |
2144 | 2144 | nghttp3_stream *stream; |
2145 | | - nghttp3_frame_entry frent; |
| 2145 | + nghttp3_frame fr; |
2146 | 2146 | int rv; |
2147 | 2147 |
|
2148 | 2148 | assert(stream_id >= 0); |
@@ -2168,23 +2168,25 @@ int nghttp3_conn_bind_control_stream(nghttp3_conn *conn, int64_t stream_id) { |
2168 | 2168 | return rv; |
2169 | 2169 | } |
2170 | 2170 |
|
2171 | | - frent.fr.settings.type = NGHTTP3_FRAME_SETTINGS; |
2172 | | - frent.aux.settings.local_settings = &conn->local.settings; |
| 2171 | + fr.settings = (nghttp3_frame_settings){ |
| 2172 | + .type = NGHTTP3_FRAME_SETTINGS, |
| 2173 | + .local_settings = &conn->local.settings, |
| 2174 | + }; |
2173 | 2175 |
|
2174 | | - rv = nghttp3_stream_frq_add(stream, &frent); |
| 2176 | + rv = nghttp3_stream_frq_add(stream, &fr); |
2175 | 2177 | if (rv != 0) { |
2176 | 2178 | return rv; |
2177 | 2179 | } |
2178 | 2180 |
|
2179 | 2181 | if (conn->local.settings.origin_list) { |
2180 | 2182 | assert(conn->server); |
2181 | 2183 |
|
2182 | | - frent.fr.origin = (nghttp3_frame_origin){ |
| 2184 | + fr.origin = (nghttp3_frame_origin){ |
2183 | 2185 | .type = NGHTTP3_FRAME_ORIGIN, |
2184 | 2186 | .origin_list = *conn->local.settings.origin_list, |
2185 | 2187 | }; |
2186 | 2188 |
|
2187 | | - rv = nghttp3_stream_frq_add(stream, &frent); |
| 2189 | + rv = nghttp3_stream_frq_add(stream, &fr); |
2188 | 2190 | if (rv != 0) { |
2189 | 2191 | return rv; |
2190 | 2192 | } |
@@ -2414,32 +2416,32 @@ static int conn_submit_headers_data(nghttp3_conn *conn, nghttp3_stream *stream, |
2414 | 2416 | const nghttp3_data_reader *dr) { |
2415 | 2417 | int rv; |
2416 | 2418 | nghttp3_nv *nnva; |
2417 | | - nghttp3_frame_entry frent; |
| 2419 | + nghttp3_frame fr; |
2418 | 2420 |
|
2419 | 2421 | rv = nghttp3_nva_copy(&nnva, nva, nvlen, conn->mem); |
2420 | 2422 | if (rv != 0) { |
2421 | 2423 | return rv; |
2422 | 2424 | } |
2423 | 2425 |
|
2424 | | - frent.fr.headers = (nghttp3_frame_headers){ |
| 2426 | + fr.headers = (nghttp3_frame_headers){ |
2425 | 2427 | .type = NGHTTP3_FRAME_HEADERS, |
2426 | 2428 | .nva = nnva, |
2427 | 2429 | .nvlen = nvlen, |
2428 | 2430 | }; |
2429 | 2431 |
|
2430 | | - rv = nghttp3_stream_frq_add(stream, &frent); |
| 2432 | + rv = nghttp3_stream_frq_add(stream, &fr); |
2431 | 2433 | if (rv != 0) { |
2432 | 2434 | nghttp3_nva_del(nnva, conn->mem); |
2433 | 2435 | return rv; |
2434 | 2436 | } |
2435 | 2437 |
|
2436 | 2438 | if (dr) { |
2437 | | - frent.fr.data = (nghttp3_frame_data){ |
| 2439 | + fr.data = (nghttp3_frame_data){ |
2438 | 2440 | .type = NGHTTP3_FRAME_DATA, |
| 2441 | + .dr = *dr, |
2439 | 2442 | }; |
2440 | | - frent.aux.data.dr = *dr; |
2441 | 2443 |
|
2442 | | - rv = nghttp3_stream_frq_add(stream, &frent); |
| 2444 | + rv = nghttp3_stream_frq_add(stream, &fr); |
2443 | 2445 | if (rv != 0) { |
2444 | 2446 | return rv; |
2445 | 2447 | } |
@@ -2493,7 +2495,6 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id, |
2493 | 2495 |
|
2494 | 2496 | assert(!conn->server); |
2495 | 2497 | assert(conn->tx.qenc); |
2496 | | - |
2497 | 2498 | assert(stream_id >= 0); |
2498 | 2499 | assert(stream_id <= (int64_t)NGHTTP3_MAX_VARINT); |
2499 | 2500 | assert(nghttp3_client_stream_bidi(stream_id)); |
@@ -2515,6 +2516,7 @@ int nghttp3_conn_submit_request(nghttp3_conn *conn, int64_t stream_id, |
2515 | 2516 | } |
2516 | 2517 | stream->rx.hstate = NGHTTP3_HTTP_STATE_RESP_INITIAL; |
2517 | 2518 | stream->user_data = stream_user_data; |
| 2519 | + stream->node.pri.inc = 1; |
2518 | 2520 |
|
2519 | 2521 | nghttp3_http_record_request_method(stream, nva, nvlen); |
2520 | 2522 |
|
@@ -2585,51 +2587,51 @@ int nghttp3_conn_submit_trailers(nghttp3_conn *conn, int64_t stream_id, |
2585 | 2587 | } |
2586 | 2588 |
|
2587 | 2589 | int nghttp3_conn_submit_shutdown_notice(nghttp3_conn *conn) { |
2588 | | - nghttp3_frame_entry frent; |
| 2590 | + nghttp3_frame fr; |
2589 | 2591 | int rv; |
2590 | 2592 |
|
2591 | 2593 | assert(conn->tx.ctrl); |
2592 | 2594 |
|
2593 | | - frent.fr.goaway = (nghttp3_frame_goaway){ |
| 2595 | + fr.goaway = (nghttp3_frame_goaway){ |
2594 | 2596 | .type = NGHTTP3_FRAME_GOAWAY, |
2595 | 2597 | .id = conn->server ? NGHTTP3_SHUTDOWN_NOTICE_STREAM_ID |
2596 | 2598 | : NGHTTP3_SHUTDOWN_NOTICE_PUSH_ID, |
2597 | 2599 | }; |
2598 | 2600 |
|
2599 | | - assert(frent.fr.goaway.id <= conn->tx.goaway_id); |
| 2601 | + assert(fr.goaway.id <= conn->tx.goaway_id); |
2600 | 2602 |
|
2601 | | - rv = nghttp3_stream_frq_add(conn->tx.ctrl, &frent); |
| 2603 | + rv = nghttp3_stream_frq_add(conn->tx.ctrl, &fr); |
2602 | 2604 | if (rv != 0) { |
2603 | 2605 | return rv; |
2604 | 2606 | } |
2605 | 2607 |
|
2606 | | - conn->tx.goaway_id = frent.fr.goaway.id; |
| 2608 | + conn->tx.goaway_id = fr.goaway.id; |
2607 | 2609 | conn->flags |= NGHTTP3_CONN_FLAG_GOAWAY_QUEUED; |
2608 | 2610 |
|
2609 | 2611 | return 0; |
2610 | 2612 | } |
2611 | 2613 |
|
2612 | 2614 | int nghttp3_conn_shutdown(nghttp3_conn *conn) { |
2613 | | - nghttp3_frame_entry frent; |
| 2615 | + nghttp3_frame fr; |
2614 | 2616 | int rv; |
2615 | 2617 |
|
2616 | 2618 | assert(conn->tx.ctrl); |
2617 | 2619 |
|
2618 | | - frent.fr.goaway = (nghttp3_frame_goaway){ |
| 2620 | + fr.goaway = (nghttp3_frame_goaway){ |
2619 | 2621 | .type = NGHTTP3_FRAME_GOAWAY, |
2620 | 2622 | .id = conn->server ? nghttp3_min_int64((1ll << 62) - 4, |
2621 | 2623 | conn->rx.max_stream_id_bidi + 4) |
2622 | 2624 | : 0, |
2623 | 2625 | }; |
2624 | 2626 |
|
2625 | | - assert(frent.fr.goaway.id <= conn->tx.goaway_id); |
| 2627 | + assert(fr.goaway.id <= conn->tx.goaway_id); |
2626 | 2628 |
|
2627 | | - rv = nghttp3_stream_frq_add(conn->tx.ctrl, &frent); |
| 2629 | + rv = nghttp3_stream_frq_add(conn->tx.ctrl, &fr); |
2628 | 2630 | if (rv != 0) { |
2629 | 2631 | return rv; |
2630 | 2632 | } |
2631 | 2633 |
|
2632 | | - conn->tx.goaway_id = frent.fr.goaway.id; |
| 2634 | + conn->tx.goaway_id = fr.goaway.id; |
2633 | 2635 | conn->flags |= |
2634 | 2636 | NGHTTP3_CONN_FLAG_GOAWAY_QUEUED | NGHTTP3_CONN_FLAG_SHUTDOWN_COMMENCED; |
2635 | 2637 |
|
@@ -2870,7 +2872,7 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn, |
2870 | 2872 | const uint8_t *data, |
2871 | 2873 | size_t datalen) { |
2872 | 2874 | nghttp3_stream *stream; |
2873 | | - nghttp3_frame_entry frent; |
| 2875 | + nghttp3_frame fr; |
2874 | 2876 | uint8_t *buf = NULL; |
2875 | 2877 |
|
2876 | 2878 | assert(!conn->server); |
@@ -2895,14 +2897,14 @@ int nghttp3_conn_set_client_stream_priority(nghttp3_conn *conn, |
2895 | 2897 | memcpy(buf, data, datalen); |
2896 | 2898 | } |
2897 | 2899 |
|
2898 | | - frent.fr.priority_update = (nghttp3_frame_priority_update){ |
| 2900 | + fr.priority_update = (nghttp3_frame_priority_update){ |
2899 | 2901 | .type = NGHTTP3_FRAME_PRIORITY_UPDATE, |
2900 | 2902 | .pri_elem_id = stream_id, |
2901 | 2903 | .data = buf, |
2902 | 2904 | .datalen = datalen, |
2903 | 2905 | }; |
2904 | 2906 |
|
2905 | | - return nghttp3_stream_frq_add(conn->tx.ctrl, &frent); |
| 2907 | + return nghttp3_stream_frq_add(conn->tx.ctrl, &fr); |
2906 | 2908 | } |
2907 | 2909 |
|
2908 | 2910 | int nghttp3_conn_set_server_stream_priority_versioned(nghttp3_conn *conn, |
|