Rename max_path_id to last_path_id for clarification
@@ -311,7 +311,7 @@ struct st_quicly_conn_t {
/**
* maximum number of path ID issued so far
*/
- uint32_t max_path_id;
+ uint32_t last_path_id;
/**
* list of struct st_quicly_new_cid_t
*/
@@ -1755,7 +1755,7 @@ static quicly_conn_t *create_connection(quicly_context_t *ctx, const char *serve
} else {
conn->_.super.master_id.path_id = QUICLY_MAX_PATH_ID;
}
- conn->_.egress.new_cid.max_path_id = conn->_.super.master_id.path_id;
+ conn->_.egress.new_cid.last_path_id = conn->_.super.master_id.path_id;
quicly_linklist_init(&conn->_.egress.new_cid.head);
conn->_.super.state = QUICLY_STATE_FIRSTFLIGHT;
if (server_name != NULL) {
@@ -3629,19 +3629,19 @@ static int update_traffic_key_cb(ptls_update_traffic_key_t *self, ptls_t *tls, i
/* NEW_CONNECTION_ID */
/** active CIDs the peer currently has */
- uint32_t n_cids_active = conn->egress.new_cid.max_path_id - conn->super.host.n_retired_cids;
+ uint32_t n_cids_active = conn->egress.new_cid.last_path_id - conn->super.host.n_retired_cids;
/** how many CIDs can we additionally offer to the peer? active_connection_id_limit is uint64_t, hence this too */
uint64_t cids_window = conn->super.peer.transport_params.active_connection_id_limit - n_cids_active;
/** new upper limit of path_id to which we can issue */
- uint64_t path_id_limit = conn->egress.new_cid.max_path_id + cids_window;
+ uint64_t path_id_limit = conn->egress.new_cid.last_path_id + cids_window;
if (path_id_limit > QUICLY_MAX_PATH_ID)
path_id_limit = QUICLY_MAX_PATH_ID;
- while (conn->egress.new_cid.max_path_id < path_id_limit) {
- int ret = schedule_new_connection_id(conn, conn->egress.new_cid.max_path_id);
+ while (conn->egress.new_cid.last_path_id < path_id_limit) {
+ int ret = schedule_new_connection_id(conn, conn->egress.new_cid.last_path_id);
if (ret != 0)
return ret;
- conn->egress.new_cid.max_path_id++;
+ conn->egress.new_cid.last_path_id++;
}
return 0;
